Jump to content
JasperReports Library 7.0 is now available ×

Variables calculated incorrectly


2005 IR Help

Recommended Posts

By: Maxim - lazy-max

Variables calculated incorrectly

2004-07-21 07:23

I have report with "Product" group. But I not understand "summary" variable logic.

 

<variable name="value" class="java.lang.Double" resetType="None" calculation="Nothing">

<variableExpression><![CDATA[new Double($F{Quantity}.doubleValue()*$F{Price}.doubleValue())]]></variableExpression>

</variable>

<variable name="total" class="java.lang.Double" resetType="Group" resetGroup="Products" calculation="Sum">

<variableExpression><![CDATA[new Double($F{Quantity}.doubleValue()*$F{Price}.doubleValue())]]></variableExpression>

</variable>

<variable name="summary" class="java.lang.Double" resetType="Report" calculation="Sum">

<variableExpression><![CDATA[$V{total}]]></variableExpression>

</variable>

 

summary=$130,474.07 - This is INCORRECT value.

 

I change variable summary:

<variable name="summary" class="java.lang.Double" resetType="Report" calculation="Sum">

<variableExpression><![CDATA[new Double($F{Quantity}.doubleValue()*$F{Price}.doubleValue())]]></variableExpression>

</variable>

 

summary=$86,269.07 - This is correct value.

 

This is a bug in jasper? Any ideas?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...