I have a table in iReport with three fields (A, B, C). I would like to print the line iff, the C field is not null. For example, if I have 2 records in my data source:
A = first, B = second, C = third
A = Up, B = Down, C = NULL
the table should have only the first row.
I tried to insert this expression into each cell (in the "Print on expression" property):
!$F{C}.equals(null)
but in this way the result is that the second line is empty (but visible).
Edit: after the first answer (now erased), the columns in the table look something like this:
<jr:column ...> <jr:columnHeader ...> <staticText> <reportElement .../> <text><![CDATA[ID]]></text> </staticText> </jr:columnHeader> <jr:detailCell ...> <textField isBlankWhenNull="false"> <reportElement ... isRemoveLineWhenBlank="true"> <printWhenExpression><![CDATA[$F{ID}!=null]]></printWhenExpression> </reportElement> <textFieldExpression><![CDATA[$F{ID}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> <jr:column ...> <jr:columnHeader ...> <staticText> <reportElement .../> <text><![CDATA[CITY]]></text> </staticText> </jr:columnHeader> <jr:detailCell ...> <textField isBlankWhenNull="false"> <reportElement ... isRemoveLineWhenBlank="true"> <printWhenExpression><![CDATA[$F{ID}!=null]]></printWhenExpression> </reportElement> <textFieldExpression><![CDATA[$F{CITY}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column>
The data source is an xml file. I tried also with isBlankWhenNull="true"
, but no change. Here is the result screen: 
source share