Java Reference
In-Depth Information
<textFieldExpression>
<![CDATA["Total Fixed Wing Single Engine Aircraft Models: " +
$F{fixed_wing_single_engine_cnt}]]>
</textFieldExpression>
</textField>
<textField>
<reportElement x="20" y="20" height="20" width="500"/>
<textFieldExpression>
<![CDATA["Total Fixed Wing Multiple Engine Aircraft Models: " +
$F{fixed_wing_multiple_engine_cnt}]]>
</textFieldExpression>
</textField>
<textField>
<reportElement x="20" y="40" height="20" width="500"/>
<textFieldExpression>
<![CDATA["Total Fixed Wing Aircraft Models: " +
$V{fixed_wing_engine_cnt}]]>
</textFieldExpression>
</textField>
<textField>
<reportElement x="20" y="60" height="20" width="500"/>
<textFieldExpression>
<![CDATA["Total Rotorcraft Aircraft Models: " +
$F{rotorcraft_cnt}]]>
</textFieldExpression>
</textField>
<textField>
<reportElement x="20" y="80" height="20" width="500"/>
<textFieldExpression>
<![CDATA["Total Aircraft Models Reported: " +
($V{fixed_wing_engine_cnt}.intValue() +
$F{rotorcraft_cnt}.intValue())]]>
</textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>
As can be seen in the example, report expressions can be assigned to a variable by
using the <variable> element in a JRXML file. We give the variable a name, by
using the name attribute of the <variable> field. The actual expression we want to
assign to a variable must be enclosed inside a <variableExpression>
 
Search WWH ::




Custom Search