AUD GBP USD CHF
2006-02-08
(Summation of all
the contractAmount
where contractCurrency
is AUD and value
date is 08-02-2006)
2006-02-09
2006-02-06
But these dates are not known to me in the beginning ie the dates can only be obtained at runtime.
So I cant hardcode the dates.
So the output for the above case should be as follows:
Subject:How to show summation based on certan conditions Author:(Deleted User) Date:06 Feb 2006 10:41 AM
Hi, Rahul.
You can use XSLT grouping to do this. At a high level, what you want to do is group on the <valueDate> element, and then loop through those groups and use the sum function to sum <contractAmount> based on <contractCurrency>.
You'll find lots of examples of XSLT grouping by searching SSDN. This topic might be a good place to start:
Subject:How to show summation based on certan conditions Author:Rahul Vaid Date:07 Feb 2006 04:37 AM
Hi,
Thanx for the instant reply that you normally give.I was able to solve the problem using the example you had given but still Iam not able to group them up on contractcurrency
Following is the cod ethat I have currently written:
Subject:How to show summation based on certan conditions Author:Rahul Vaid Date:07 Feb 2006 06:29 AM
To solve the problem of summing up on contract currency I even used the sum in two different ways as follows, But Iam still unaware of how to use the the filtering on contractcurrency.
Subject:How to show summation based on certan conditions Author:(Deleted User) Date:07 Feb 2006 05:37 PM
Hi, Rahul. Attached is a solution that should provide what you are looking for. One thing to note is that it uses a key (formed by concatenating valueDate and contractCurrency) in order to identify unique occurrences on which to perform the sum function.
We offer free support for Stylus Studio on this site (since this is the Stylus Studio Developer Network), but if this is a generic XSLT question, you might want to consider asking it on the xsl-list mailing list, which specializes in general-purpose XSLT issues. Here is just one resource to consider: