Jump to content

Print when isn't the last page


2006 IR Open Dicussion

Recommended Posts

By: Rapsodia - rapsodia

Print when isn't the last page

2006-06-30 01:12

Hy ,

In my report i would to print something on page footer if the page isn't the last one, but i can't do that....

Someone can help me?

Thanks to all

 

 

 

 

By: TBG - thebiggunner

RE: Print when isn't the last page

2006-06-30 02:43

Hi.

 

How many pages do you have?

You can print the page footer only if you have more pages. If you have only one page, this page is the last page and only the last page footer will print.:)

 

 

 

 

By: Rapsodia - rapsodia

RE: Print when isn't the last page

2006-06-30 03:15

The number of the page are variable.

The idea is to print how i need on page footer, but in the last page the footer doesn't print becouse how i need is in the last page footer.

 

 

 

 

By: ts_chung - ts_chung

RE: Print when isn't the last page

2006-06-30 17:34

i think you need to show last page footer band and page footer band together.

what you need to display on page footer put inside page footer band.

what you need to display on last page footer put in last page footer band.

if nothing to show in last page footer but dun want to print there just left the last page footer band empty.

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

The only way I found to know when the last page is printed is to include in sql a reference to last record to be printed and create a variable to perform a test.

 

SELECT cod,nom ..., (SELECT MAX(cod) FROM ...) as maxcod ...

 

$V{isLastPage) == $F{cod}.equals($F{maxcod})

 

 

print when is last page

print when expresion:

$V(isLastPage)

or print when is not the las page

print when expresion:

new Boolean(!$V{isLastPage}.booleanValue())

Link to comment
Share on other sites

  • 2 months later...

I'm having a similar problem.

I'm printing a whole lot of invoices. The last page of each invoice needs two tick marks on the right edge, the other pages need one tick mark. They are used by the pitney bows folder/envelope stuffer.

I had high hopes of placing two lines on the background and then marking one of them with a print when expression that meant if lastPage.

However, there does not seem to be anyway to do that.

I had been expecting to do

new Boolean($V{PAGE_NUMBER}.equals($V{PAGE_COUNT})

 

But I only just found out by digging through the source code that page count is not the number of pages, but the number of records so far on the page.

 

So, I'm stumped, and this is a complete blocking issue.

I may need to go use another tool.

 

Is there any way to display something in the middle of the page on the last page?

Link to comment
Share on other sites

  • 2 months later...

No.

 

I'm frustrated with Jasper and the designers of the tools failing to recognize that such an ability could be so necessary. They were worried about how messy their code would get.

I've pointed out that every credit card bill or multipage invoice is now not really possible with jasper.

 

Didn't help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...