Java Reference
In-Depth Information
Creating Your First Report
In this chapter, you will create, compile, and preview your first report. At the end of
this chapter, you will be able to:
Create a simple JRXML report template
Generate Jasper binary report templates by compiling JRXML files
Preview report templates by using JasperReports custom ANT targets
Write code that will generate a report from a JasperReport template
View generated reports in JasperReports' native format using the tools
provided by JasperReports
Generate reports that can be viewed in a web browser
Identify the JRXML elements corresponding to the different report sections
Creating a JRXML Report Template
The first step when creating a report is to create a JRXML template. As mentioned
in Chapter 1, JasperReports JRXML templates are standard XML files. However, by
convention, they have an extension of .jrxml , and are referred to as JRXML files or
JRXML templates. All JRXML files contain a <jasperReport> root element that can
contain many sub-elements. All of these sub-elements are optional. Since our goal
for this chapter is to get a feel of how to design a report, we will obviate most of
the <jasperReport> sub-elements. We will use only one sub-element, namely the
<detail> sub-element.
Search WWH ::

Custom Search