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" ?> <jasperReportxmlns="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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.