kz Posted June 9, 2014 Share Posted June 9, 2014 I define a field "totAmt" to sum all the "yitemval" in table<field name="totAmt" class="java.lang.Float"/><field name="yitemval" class="java.lang.Float"/> <variable name="totAmt" class="java.lang.Float" resetType="Report" calculation="Sum"><variableExpression><![CDATA[$F{yitemval}]]></variableExpression></variable> and output the totAmt at the end of the report:<textFieldExpression class="java.lang.Float"><![CDATA[$V{totAmt}]]></textFieldExpression></textField>and it gets incorrect result.I have an example heretotal amount should be 149968.45, but V{totAmt} shows 149968.44what's the problem?? Link to comment Share on other sites More sharing options...
idstewart Posted June 11, 2014 Share Posted June 11, 2014 Try BigDecimal instead of Float Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now