O'Reilly logo

Java EE Development with Eclipse by Deepak Vohra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the configuration file

We require a JasperReports configuration file for generating reports. JasperReports XML configuration files are based on the jasperreport.dtd DTD, with a root element of jasperReport. We shall specify the JasperReports report design in an XML configuration bin file, which we have called config.xml. Create an XML file config.xml in the webContent folder by selecting XML | XML File in the New wizard.

Some of the other elements (with commonly used subelements and attributes) in a JasperReports configuration XML file are listed in the following table:

XML element

Description

Subelements

Attributes

jasperReport

Root element

reportFont, parameter, queryString, field, variable, group, title, pageHeader, columnHeader ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required