Jump to content

$V calculation type=sum, result not right


kz

Recommended Posts

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 here

total amount should be 149968.45, but V{totAmt} shows 149968.44

what's the problem??

20140609122236.jpg.e95c6f18ab32fd276d593757d45f55f9.jpg

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...