Reputation: 644
I have the following problem with JasperReports , I receive the content correctly , however when the content is null i am interesting to not showing nothing.
Could anyone help to me?
<textField>
<reportElement x="0" y="0" width="100" height="20"/>
<box leftPadding="10"/>
<textElement/>
<textFieldExpression><![CDATA[$F{nombre}]]></textFieldExpression>
</textField>
Upvotes: 0
Views: 3264
Reputation: 933
Set "blank when null" checkbox at property of field
After that definition text filed in jrxml like this:
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
....
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{leftColumn}]]></textFieldExpression>
</textField>
Upvotes: 1