I wanted to hide text fields in jasper i-report when they are empty.
So I put this expression in those field's Print When Expression
$F{field_cashPaymentReceiptMode} != null && !"".equals($F{field_cashPaymentReceiptMode})
But then I got an error while compiling the report.
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
value = ((java.lang.String)field_cashPaymentReceiptMode.getValue())!=null &&!"".equals(((java.lang.String)field_cashPaymentReceiptMode.getValue())); //$JR_EXPR_ID=33$
<-------------------------------------------------------------------->
1 errors
Please help me.