Java Reference
In-Depth Information
</crosstabCell>
</crosstab>
</band>
</detail>
</jasperReport>
After compiling this template and filling the resulting Jasper file, we should get a
report that looks like the following:
As we can see, the report template generates a different crosstab for each record in
the
<detail>
section of the report. To accomplish this, we need to create a query
inside the
<subdataSet>
element. The query must have one or more parameters,
also defined inside
<subdataSet>
. This parameter needs to be populated with a
report expression. In this example, we use the
city
field for this purpose.