Jump to content
Changes to the Jaspersoft community edition download ×

Dynamic Sum problem


francesco334

Recommended Posts

Hello All,

 

I have the necessity,in iReport, to Sum much Variables or Fiels.

 

It seems simple,with the Sum function of iReport,but my problemis this:

 

1)In the Details Band, I must Sum all the Amount (that can be stay in field BaseAmount or in field TaxAmount in case of Tax="True" or Tax="false") setting the value of the Amount field in a Variable "Total".

 

2) Then I'll show the value of Total, in the Summary band!

 

How can I do???

 

I send you the jrxml and xml.

 

Thanks for all your response!

 

Francesco [file name=Fattura.zip size=9817]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/Fattura.zip[/file]

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

I've found the way with the search forum to make the sum with the variables.

 

new Double( $V{var1}.doubleValue() + $V{var2}.doubleValue() )

 

It is supposed that the type is Double.

 

If you change the + with another operator (e.g. -) you can make the others elementary operations.

 

I Hope that this help

 

Bye

zannabianca

Link to comment
Share on other sites

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