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!
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!
2 Answers:
Posted on June 10, 2010 at 8:56am
The updated link is http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=2173
Regards,
Lucian