Reputation: 377
How can I achieve this? I also tried using "print when expression" with condition
new Boolean($V{PAGE_NUMBER}.intValue() < $V{PAGE_COUNT}.intValue())
but sadly it does not work. Please help me.
Upvotes: 3
Views: 5624
Reputation: 10511
Comparing PAGE_NUMBER
and PAGE_COUNT
is like comparing apples and oranges.
- PAGE_NUMBER: At every iteration it contains the number of the pages that compose the report.
- PAGE_COUNT: Contains the number of record processed in the current page
To answer the question: JasperReports knows a band type "Last Page Footer" (wiki description) to define a different footer on the last page.
(Your problem might already be solved. But I stumbled upon this two year old question while having a similar issue and wanted to leave a hint, that one should not compare those variables.)
Upvotes: -1
Reputation: 1298
This print when expression works fine for me $V{PAGE_NUMBER}<$V{PAGE_COUNT}
. It works when applied to either the column footer band or the footer band element (I used static text).
Upvotes: 2