Jump to content

How to get sum of attributes under a node?


nitin403

Recommended Posts

Hi! to all.

I need get total of amount in a node.

Below is an sample of my xml datasource.

Code:
<A>
<B Amount="20" />
<B Amount="20" />
<B Amount="20" />
<B Amount="20" />
<B Amount="20" />
<B Amount="20" />
<B Amount="20" />
<B Amount="20" />
</A>


 

My Query string is /A

 

I want to take /A/B as An Object and get the summation of /B/@Amount attribute.

How can I do this.

I use iReport.

 

Thanks for your help in advance.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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