Avoid repeating column header in JRXML

MPA picture MPA · Sep 8, 2011 · Viewed 32.7k times · Source

How can I avoid the column name repeating in JRXML? Is there any attribute for avoiding having the column header in each page when generating a report using JRXML and Jasper?

Answer

GenericJon picture GenericJon · Sep 16, 2011

If the header will always be on a specific page (e.g. the first page), you can add

<printWhenExpression><![CDATA[$V{PAGE_NUMBER}==1]]></printWhenExpression>

to the band, which will make it only print on page 1. PAGE_NUMBER is an inbuilt variable that is automatically incremented as the report is generated.