user3233787
user3233787

Reputation: 377

The column footer band not to print on last page

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

Answers (2)

Roland Weisleder
Roland Weisleder

Reputation: 10511

Comparing PAGE_NUMBER and PAGE_COUNT is like comparing apples and oranges.

The Built-In Variables

  • 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

Robert Mugattarov
Robert Mugattarov

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

Related Questions