Java Reference
In-Depth Information
Other JasperReports
Features
JasperReports has several features that allow us to create elaborate reports. Some of
the features we will cover in this chapter include:
•
How to display report text in different languages by using report
localization/internationalization
How to execute snippets of Java code by using scriptlets
How to create cross-tabulation (crosstab) reports
How to use subdatasets to run a query with the results of a different query
How to add anchors, hyperlinks, and bookmarks to reports to ease
navigation between report sections
How to handle large reports using the report virtualization feature of
JasperReports
•
•
•
•
•
Report Localization
JasperReports takes advantage of the Java language's internationalization features to
generate reports in different languages. The following JRXML template will generate
a report displaying a line of text that will be different depending on the locale used:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN"
"http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport name="LocalizationDemoReport"
resourceBundle="localizationdemo">
<summary>
<band height="60">