Quantcast
Channel: SQLServerCentral » Reporting Services » Reporting Services » Latest topics
Viewing all articles
Browse latest Browse all 2791

How to sum on parent column but still display child columns

$
0
0
Hi I am new to SSRS. I could generate simple reports.But I am stuck generating the following report.I have a DataSet which gets the following data.[b]OfficeId OfficeResources GroupId GroupDesc[/b]10 1000 G1 Desc110 1000 G2 Desc220 2000 R1 RDesc120 2000 R2 RDesc220 2000 R3 RDesc3I want to create a report to display the above result in the following format[b]OfficeId OfficeResources GroupId GroupDesc[/b]10 1000 G1 Desc1. . . . . . G2 Desc220 2000 R1 RDesc1. . . . . . R2 RDesc2. . . . . . R3 RDesc3---------------------------------------------OfficeCount = 2 TotalOfficeResources = 3000But I am getting TotalResources = 8000Please ignore the "." Substitute it for a space. I used "." here in the post to better format my report.I am grouping on OfficeId and OfficeResources in SSRS and not in the TSQL.I used CountDistinct(Field!OfficeId.Value) for Count and I am getting count = 2, which I want.I used Sum(Field!OfficeResources.Value) for TotalResources, so am getting 8000. which is not what I want. I want sum on distinct OfficeResources to be 3000.How can I achieve this. Any help is really appreciated.Thank youGuru.

Viewing all articles
Browse latest Browse all 2791

Trending Articles