Subdatasets

Sometimes we would like to display related charts or crosstabs for similar data grouped differently. For example, in the previous section, we generated a crosstab displaying the total number of aircraft of a particular set of models in the state of New York. We can display the same set of data for different states by using subdatasets. The following example illustrates how to do this:

<?xml version="1.0" encoding="UTF-8" ?> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://jasperreports.sourceforge.net /jasperreports http://jasperreports.sourceforge.net/xsd /jasperreport.xsd" name="DatasetDemoReport" leftMargin="5" rightMargin="5"> ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.