Java Reference
In-Depth Information
<![CDATA["Aircraft registered in " + $F{state}]]>
</textFieldExpression>
</textField>
<barChart>
<chart>
<reportElement width="500" y="30" x="0" height="170"/>
</chart>
<categoryDataset>
<dataset>
<datasetRun subDataset="Aircraft_Registrations">
<datasetParameter name="StateParam">
<datasetParameterExpression>
<![CDATA[$F{state}]]>
</datasetParameterExpression>
</datasetParameter>
</datasetRun>
</dataset>
<categorySeries>
<seriesExpression>"City"</seriesExpression>
<categoryExpression>
<![CDATA[$F{city}]]>
</categoryExpression>
<valueExpression>
<![CDATA[$F{aircraft_count}]]>
</valueExpression>
</categorySeries>
</categoryDataset>
<barPlot isShowTickMarks="true"
isShowTickLabels="true">
<plot orientation="Horizontal"/>
</barPlot>
</barChart>
</band>
</detail>
</jasperReport>
Notice how the <dataset> element inside <categoryDataset> contains a
<datasetRun> element, with its subdataset attribute set to the subdataset declared
at the beginning of the report. After compiling the preceding JRXML template and
filling the resulting Jasper template, we should get a report like the following:
 
Search WWH ::




Custom Search