I want to show nothing when a numeric value is zero (strict no zeros at left)
What JasperReports format should I use so spreadsheet output like XLS gets empty cell when the value is zero 0;-0;;@ format?
I want to show nothing when a numeric value is zero (strict no zeros at left)
What JasperReports format should I use so spreadsheet output like XLS gets empty cell when the value is zero 0;-0;;@ format?
One solution is to use two different PrintWhenExpressions for two field texts.
$F{columnname} == 0
and
$F{columnname} != 0
Or create a String variable (e.g., $V{b_columnname}
) with the following expression:
$F{columnanme} == 0 ? '' : '' + $F{columnname}
Then remove the two static fields and replace them with a single String field:
$V{b_columnname}