Search code examples
jasper-reports

Jasperreports: How to put a summary chart only in the report first page?


I wanted to use the concept of bands to put the "Summary" band right after title but this is not possible.

If I put the chart in the "Page Header" band chart is repeated across all the report pages. I only want to have the chart in the first page and let the table details in the next pages without having a repeated chart in every page.


Solution

  • The easiest way to put content only onto the first page is by adding it to the title band.

    If this is not possible, e.g. because your desired content shall be displayed after some material in the page header band, look for other options in this answer which use frames with print-when-expressions like this

    <printWhenExpression><![CDATA[new Boolean($V{PAGE_NUMBER}.intValue()==1)]]></printWhenExpression>
    

    in other bands.