Jasper Report: Total Pages

To have total pages, you can do two options:

To display total pages using Evaluation Time: Report
  1. On view using $V{PAGE_NUMER} flexible using evaluation time: current page with “Now”, total page with “Report”
  2. Create a variable for total page
    1. Name: TOTAL_PAGES (or any other)
    2. Variable class: Integer
    3. Calculation: highest
    4. Reset type: report
    5. Increment type: page
    6. Variable expression: ${PAGE_NUMBER}

Then you can use on report in the field.

Known Issues:

  • When using with Print Expression, it won’t do pre-calculate

Published by osify

Find us via: Twitter, Facebook

Leave a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.