Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Grouping header problem

Author  Topic 

abhijay
Starting Member

5 Posts

Posted - 2012-07-26 : 13:38:01
I have a table in my database which has repetitive columns. I made two groups(ABC, XYZ) in my SSRS. In the table, the innermost group XYZ header shows the data. So the repetitive data is shown only once. Now the outermost group ABC header shows the sum of the data that appears in the XYZ header column. For that I use SUM(Fields!aaa.value). But the problem is ABC header column is SUM of all the data in that column. I just want to SUM of that data that shows in XYZ header column and not the total details group.

Table-

ABC XYZ CCC DDD EEE

1 1 33 44 45

1 1 33 44 55

1 3 33 44 56

Here XYZ header columns will show 33 and 44 once. That is correct. But I want the ABC header to take value from XYZ header column and not the details column and bcoz of that 33 is counted thrice but should be counted only once.

Please suggest me .

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-07-26 : 14:23:55
try with a condition like this

=SUM(IIF(RowNumber("XYZ group name here")=1,Fields!aaa.value,0))

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

abhijay
Starting Member

5 Posts

Posted - 2012-07-26 : 20:56:38
Do I have to write this on one of the ABC group header column?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-07-27 : 01:08:11
quote:
Originally posted by abhijay

Do I have to write this on one of the ABC group header column?



you've write it on header where you're showing XYZ totals

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -