|
Rank: Newbie
Joined: 8/20/2015 Posts: 2 Location: Leeds
|
Code:
Hi, Im using the line below to get a grand total sum(/XML/claims[*]/expenses/expense[*]/amount) but I want to use something similar for sub totals I have two sub records, so sum(/XML/claims[1]/expenses/expense[*]/amount) gives me 20 sum(/XML/claims[2]/expenses/expense[*]/amount) gives me 0.99 and sum(/XML/claims[*]/expenses/expense[*]/amount) gives me 20.99 But for the subtotals, I need something generic like sum(/XML/claims[[b]ROWNUMBER[/b]]/expenses/expense[*]/amount) Please help Matt
|
|
Rank: Newbie
Joined: 10/28/2002 Posts: 1,283 Location: AT
|
Hi,
I would suggest explaining exactly what ROWNUMBER is supposed to signify and also attaching your ".sps", ". xsd" and ".xml" files so that the context of the question is clear.
|
|
Rank: Newbie
Joined: 8/20/2015 Posts: 2 Location: Leeds
|
Hi Island/All
Please see the requested files here https://kiteworks.explorer.uk.com/w/vqRaV2p8
Don't pay too much attention to "ROWNUMBER" at this point. I primarily want to get get the subtotals working - please could you take a look.
Kind Regards Matt
island wrote:Hi,
I would suggest explaining exactly what ROWNUMBER is supposed to signify and also attaching your ".sps", ". xsd" and ".xml" files so that the context of the question is clear.
|
|
Rank: Newbie
Joined: 10/28/2002 Posts: 1,283 Location: AT
|
Hi,
instead of using an absolute path in your autocalc, simply use a relative path because the table is already in the "claims" element:
Code:sum(expenses/expense[*]/amount)
This will then aggregate the amounts for each "claims" element..
|
|
guest |