This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jasper report - How could I store the total number of pages of a report in a custom variable ?

 
Sergio Marcello
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Jasper experts,

I'm aware that if I want to know the current page number of a report, I have to use the built-in variable PAGE_NUMBER and set the evaluation time property to 'Now', while if I want to get the total number of pages of the report, I have to use the same built-in variable PAGE_NUMBER, but set the evaluation time property to 'Report'.

So far, so good.

However, I need the value of the total report pages in a custom variable, so that I can use it, for example, in a "print with condition" property, in order to decide to print or not an header, depending on that value.

How can I do that ? The evaluation time property is not available for a custom variable; is there a tricky way to circumnavigate this problem ?

How would you store the total number of pages of a report in a custom variable ?

Regards,
Sergio.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic