Java Reference
In-Depth Information
</band>
</pageHeader>
<detail>
<band height="24">
<textField>
<reportElement x="0" y="0" width="100" height="24"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression>
<![CDATA[$F{model}]]>
</textFieldExpression>
</textField>
<textField>
<reportElement x="110" y="0" width="100" height="24"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression>
<![CDATA[$F{tail_num}]]>
</textFieldExpression>
</textField>
<textField>
<reportElement x="220" y="0" width="100" height="24"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression>
<![CDATA[$F{aircraft_serial}]]>
</textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>
As we can see, we did not have to do anything special to make this report a
subreport. This is because any report can be used as a subreport. Let us see what the
parent report's JRXML looks like.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN"
"http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport name="AircraftStateReport">
<parameter name="state" class="java.lang.String"/>
<queryString>
<![CDATA[select city
 
Search WWH ::




Custom Search