Summing for each group only
Hi All,
I need help trying to get results like below, the part in red.
I can calculate the:
qtr qtys to get qty total
and
qty total x cost to get total cost
my issue is with adding only for each Group (see text in red).
right now i can sum all to get grand total, but need help with just making it add for group1,
then group 2, etc. is this normally handled in the sql query or in the
asp rs?
any help/suggestions is greatly appreciated.
----------------1Q - 2Q - 3 Q - 4Q - Qty Total- Cost - Total Cost
Group1
-subGroup1
-----------Item1 1 - 1 - 0 - 0 - 2 - $100 - $200
-----------Item2 0 - 1 - 0 - 1 - 2 - $100 - $200
-subGroup2
-----------Item3 1 - 0 - 0 - 1 - 2 - $100 - $200
-----------Item4 0 - 0 - 0 - 1 - 1 - $100 - $100
Group2
-subGroup3
-----------Item5 0 - 0 - 0 - 1 - 1 - $100 - $100
-----------Item6 2 - 2 - 2 - 1 - 7 - $100 - $700
ETC....
Group1Totals 2 - 2 - 0 - 3 - 7 - blank -$700
Group2Totals 2 - 2 - 2 - 1 - 7 - blank -$800
ETC....
GRAND Total 4 - 4 - 2 - 4 - 14 - blank -$1500
Rebelle, May 22nd, 2008 03:10 PM
Bookmarks