JasperReports: default value instead of 'null'

后端 未结 5 999
轻奢々
轻奢々 2020-12-18 23:22

Is there any way to set a default value to a field in a report? I have a lot of String fields in a report and would like them to display \"0,00\" when they\'re null.

5条回答
  •  情深已故
    2020-12-19 00:01

    Supposing the field name is "value", in the "Text Field Expression", write:

    ($F{value} != null) ? $F{value} : "0.00"

提交回复
热议问题