Java Reference
In-Depth Information
Some report design tools will only generate database reports by
embedding a database query into the report template. If we are
using one of these tools, then we have little choice but to use this
method. We are free to remove the <queryString> element from
the JRXML after we are done designing the report and pass the
JRResultSetDataSource at run time. However, if we do this, we
lose the ability to modify the report template from the report designer.
In this chapter, we covered the different ways through which we can create
database reports. We learned to embed SQL queries in a report template by
using the <queryString> JRXML element as well as to populate an instance of
JRResultSetDataSource with data from a result set and use it to fill a report.
The chapter also dealt with the procedure to declare report fields to access data from
individual columns in the result set of the query used to fill the report. Towards the
end of the chapter, we generated reports that are displayed in the user's web browser
in PDF format.
Search WWH ::

Custom Search