Elements of a JRXML report template

In the previous example, we used the <detail> element of the JRXML report template to generate a report displaying some static text. The <detail> element is used to display the main section of the report. However, JRXML templates can contain many other sections that allow us to display secondary data on the report or to do some other tasks, such as importing Java packages and controlling how the data is displayed in the report.

The following sections cover all the subelements of the <jasperReport> root element. Unless stated otherwise, each element can be used any number of times in the template.

<property>

This element is used for putting arbitrary information in the report template.

<property name="someproperty" ...

Get JasperReports 3.5 for Java Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.