Background
ResultSet has many Double value fields (with patterns such as "###0.000" ). Some values ββmay be null .
Problem
I want to replace null values ββwith "N/A" , which is a String and cannot print in a Double field. Printing "0.00" for null values ββis not acceptable.
Using the value of PrintWhenExpression ($F{value} != null) ? $F{value} : "N/A" ($F{value} != null) ? $F{value} : "N/A" does not work; therefore, templates cannot be used.
Idea
Add hidden fields that write "N / A". These fields will be printed only if null .
Question
Is there a better solution, and if so, what is it?
Thanks.
jasper-reports ireport textfield
jiraiya
source share