all groups > sql server reporting services > march 2007 >
You're in the

sql server reporting services

group:

Sum to group totals


Sum to group totals Willo
3/29/2007 9:30:48 AM
sql server reporting services: hi;

im affraid this will be an stupid question...

i have a table with records like this

cve valor
R1 100
R1 120
R1 145
R1 50
R2 67
R2 98
R2 200
R3 345
R3 20
R4 122
R4 80
R4 12
R4 20

i have a total for each group of CVE, but im trying to sum the total of R1's
group with R2's, R3's with R4's and finally the sum of R1 and R2 minus the
sum of R3 and R4

ill appreciate any sugestion to do this... thanks

Re: Sum to group totals EMartinez
4/1/2007 7:16:28 PM
[quoted text, click to view]


I would suggest doing this in the stored procedure or query that is
sourcing the report; since, you would have more flexibility there -or-
you could use separate queries as datasets.
Something like:

select sum(valor) as Sum1
from table_x
where cve in ('R1', 'R2')

select sum(valor) as Sum2
from table_x
where cve in ('R3', 'R4')

Hope this helps.

Regards,

Enrique Martinez
Sr. Software Consultant
AddThis Social Bookmark Button