Hi,
Below is my requirement, I need to find minimum date in type group where group name equal to 'aaa' then compare rest of Transaction group dates, if any date is less than this date then make amount zero.
Ex: in 101 transaction minimum date for type 'aaa' is 01/01/2010 and when compare this date with rest of dates 01/01/2009 is less than this date so, my amount should be zero.
Transaction | type | date | amount | required results |
---|---|---|---|---|
101 | aaa | 01/01/2010 | 5678 | 5678 |
101 | aaa | 01/10/2011 | 5464 | 5464 |
101 | def | 05/08/2010 | 9876 | 9876 |
101 | dez | 01/01/2009 | 5656 | 0 |
101 | dex | 05/01/2011 | 7658 | 7658 |
102 | aaa | 01/10/2011 | 6785 | 6785 |
102 | aaa | 01/01/2009 | 4567 | 0 |
102 | xdw | 11/12/2008 | 3234 | 3234 |
102 | dfe | 10/12/2010 | 2123 | 2123 |
102 | xsd | 03/12/2011 | 4563 | 4563 |
I can do this through sub report, but due to huge volume of date this report is running for 10 hrs.and it is not acceptable. Need to do this in single report.
Thanks in advance for any suggestions.
-Sastry