Jump to content
We've recently updated our Privacy Statement, available here ×

Possible to store data, add up totals then display?


jjacob_1

Recommended Posts

I'm using xpath to build a report which I'm sure is easier with SQL but for the sake of not having to redesign the whole report from scratch, is it possible to retrieve $F{descrption}, store it into an array or hash or something similar in ireport, then after processing all of the fields, then printing out the totals?

Here is an example, say you have the following listed descrptions (the numbers are amount):

2 Laptop

1 Laptop

3 Cables

4 Monitors

When it goes through this list I would like it to print out:

3 Laptop

3 Cables

4 Monitors

By perhaps taking list one, storing it into an array/hash and then retreving the list for use later?

 

Sorry if it's not explained well, its early. Lemme know if I need to try and explain it better.

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