JasperReports: default value instead of 'null'

后端 未结 5 986
轻奢々
轻奢々 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条回答
  •  梦毁少年i
    2020-12-18 23:41

    Did you try set a pattern in the text field?

    If you are using iReport this can be found in the properties for the text field in the Text Field Properties section.

    Try something along the lines of ###0.00 to represent 1234.56, which would always display 0.00 even if it is null.

提交回复
热议问题