Knowing page number

By: Fabrizio Nervegna - iccio
Knowing page number
2004-10-10 02:45
My problem is:
i have to know the current page number so i can print something only on the last page, using printWhenExpression.
With the PAGE_NUMBER variable i know the TOTAL page number but i can't use evaluation time for the current page number (only available for text field).
So how can i know in an expression the current page number?
Thanx




By: Teodor Danciu - teodord
RE: Knowing page number
2004-10-10 03:03

Hi,

The PAGE_NUMBER variable holds the current page
number. The total number of pages is known only
when the document reached the end. This is why
we use the evaluationTime to display the total number
of pages by indicateing to the engine the for that
particular text field it has to postpone the rendering
of the value until the end of the report has been reached.

Your problem is that you cannot know the total
number of pages inside the printWhenExpression
because these expressions are always evaluated "Now".

You have to use a trick in order to detect the fact
the the rendering has reached the final page or at
least reached the reagion where the summary section
usually appears.
This has been explained several times on the forums.
Try a search for "last page" in the forums.

You might also consider using the newly introduced
"lastPageFooter" section.

Thank you,
Teodor





By: Teodor Danciu - teodord
RE: Knowing page number
2004-10-10 03:08

Hi,

This might be the trick to use in case
the "lastPageFooter" does not suit your needs:

https://sourceforge.net/forum/message.php?msg_id=1786694

I hope this helps,
Teodor





By: Fabrizio Nervegna - iccio
RE: Knowing page number
2004-10-10 03:53
Thanx a lot for your precious help!
2005 IR Help's picture
Joined: Aug 9 2006 - 3:40am
Last seen: 16 years 10 months ago

2 Answers:

I need to know this trick of finding the last page.

The URL is inaccessible as I get a message that the forum is private

 Could people who know how to find if the current page is last page, pls reply?

 

Thanks

report_user's picture
Joined: Aug 12 2009 - 8:43pm
Last seen: 13 years 9 months ago
lucianc's picture
76568
Joined: Jul 17 2006 - 1:10am
Last seen: 4 days 6 hours ago
Feedback
randomness