views:

18

answers:

1

I am working with ireport and generate around 20 pdf report also.Now I want all the field blank in the report where its contain value 0 (zero).

For that I set text field expression with the code ($F{diamondQty}.doubleValue()==0.0?null:$F{diamondQty}.doubleValue())

and enable blank when null option of the field.

It's working fine but require to do same for all the field of all 20 reports.

Is there any other better solution for that ?

A: 

Maybe you can use a FormatFactory.
A format factory allows you to specify your own date and number formats. You can set it as a report property (formatFactoryClass) , or set it as a parameter (REPORT_FORMAT_FACTORY)

yshalbar