aspose file tools*
The moose likes Other Open Source Projects and the fly likes Jasper report - How could I store the total number of pages of a report in a custom variable ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Jasper report - How could I store the total number of pages of a report in a custom variable ?" Watch "Jasper report - How could I store the total number of pages of a report in a custom variable ?" New topic
Author

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

Sergio Marcello
Ranch Hand

Joined: Jun 20, 2008
Posts: 36
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.


SCJP 6
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jasper report - How could I store the total number of pages of a report in a custom variable ?