I got trouble with format number in JasperReports.
For example, i have a double value, and i put the format pattern like #,##0.000
Now, with value of number 1.123, i got what i want, but if the value is only 1, or 1.2 it return 1.000 and 1.200, not 1.2 or 1. How can i trim all unnecessary zero in this case.
Here is piece of jrxml:
<textField pattern="#,##0.000;-#,##0.000" isBlankWhenNull="true">
<reportElement x="2390" y="0" width="60" height="25"/>
<textFieldExpression><![CDATA[$F{C9} == null ? 0 : $F{C9}]]></textFieldExpression>
</textField>