2005 IR Help Posted August 27, 2006 Share Posted August 27, 2006 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! Link to comment Share on other sites More sharing options...
report_user Posted May 25, 2010 Share Posted May 25, 2010 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 Link to comment Share on other sites More sharing options...
lucianc Posted June 10, 2010 Share Posted June 10, 2010 The updated link is http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=2173Regards,Lucian Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now