Multiple Group by's | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Multiple Group by’s

Hi, I have a scenario as below: (Crystal Allows this and people with crystal knowledge will appreciate the problem) ———
group1 header
———
group 2 header1 inside group 1
———
Detail Value 1
Detail Value 2
———
group2 footer1
———
group 2 header2 inside group 1
———
Detail Value 3
Detail Value 4
———
group2 footer2
———
group 1 footer
——— Now in the Group 1 footer(last row above), i need the summation for only the first details field of Group 2, i.e., Value 1 + Value 3 + Value 5 and so on. . ..
I tried with runningvalue() function but it gives the summation for all the fields. . .
Crystal allows resetting the value and calculating the value on different group for running totals. . .. Hoping that everyone gets the scene, please help with it. .. .
Thanks,
]]>