How to leave the values in the report with iReport (or TIBCO) only with 2 decimal places

0

I wanted to make my values in Reals, only 2 decimal places in my report, but I do not know where to declare it. In my application I declare all type floa

    
asked by anonymous 04.11.2017 / 13:18

1 answer

1

Set the pattern attribute for the textField tag:

    <textField pattern="###0.00">
        <reportElement x="437" y="462" width="100" height="20"/>
        <textElement/>
        <textFieldExpression class="java.lang.String"><![CDATA[$F{fieldFloat}]]></textFieldExpression>
    </textField>

If you are using an IDE, such as iReport, the properties of the object will have this pattern attribute with several options.

    
04.11.2017 / 14:47