<textField pattern="#0.000;(#0.000-)">
<reportElement x="430" y="2" width="30" height="20" uuid="4eba3e3c-c0d5-4da0-a71a-b805092110a9">
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="pixel"/>
</reportElement>
<textElement textAlignment="Right" markup="html">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{previous4} < 120.0 ? "<font color=red>" + $F{previous4} + "</font>" : "<font color=black>" + $F{previous4} + "</font>"]]></textFieldExpression>
</textField>
I need to change a color of a field (java double) based upon is value to RED. That is working fine.
What does not work is the formating of the number.
When using HTML markup 37.50 becomes 37.5
When using HTML markup 37.00 becomes 37.0
Howeverm, when using HTML markup 37.55 becomes 37.55
Any ideas?
Thank you
Peter