Agregate Issue
May 4, 2008Hi there
I am trying to figure out this query below to displaying in the RS:
ORDERBY, SECTIONAREA, RATE, VALUE
1, AREA1, 'Rate1', $10
2, AREA1, 'Rate2', $11
3, AREA2, 'Rate3', $20
4, AREA2, 'Rate4', $21
I've managed to display into RS as follow by putting grouping for SECTIONAREA field and SUM the VALUE field and turns out ok:
AREA1
Rate1 | $10
Rate2 | $11
Total Area1 | $21
AREA2
Rate3 | $20
Rate4 | $21
Total Area2 | $41
Now, I want to add extra lines which are basically TAX and TOTAL COST so it will be like this:
AREA1
Rate1 | $10
Rate2 | $11
Total Area1 | $21
AREA2
Rate3 | $20
Rate4 | $21
Total Area2 | $41
TAX | (Total Area1 + Total Area2) * 0.1
TOTAL COST | (Total Area1 + Total Area2) * 1.1
Any ideas? I am not sure how to add a new line for handling TAX and TOTAL COST. I can probabaly put every detail as a data set in RS or built another data set and stick in but that but that's defeat the purpose ... I guess.
I am appreciated your commment.
Thank you