SSRS Group by in the List Report

2019-02-25 23:44发布

问题:

I am working on a SSRS Report where i have to group by the Customer Name.

Dataset will be something like this. Select Column1, Column2,Column2 from Customer Group by CustomerName

Expected Report Layout 

Customer Name :   Jim Mouse
DOB           :   12/01/1970

Column1            Column2            Column3

100                DateTwo           Some Entry
200                Assignment        Entered works
300                Freelance         Tesing 


Customer Name :   Sendil P
DOB           :   12/01/1990

Column1            Column2            Column3

100                work hard          SSRS
200                Test Zone          Earth world

Issue, i am facing. By placing List, on every row of record, i am getting same customer name, DOB is repeated.

Current Output

Customer Name :   Jim Mouse
DOB           :   12/01/1970

Column1            Column2            Column3

100                DateTwo           Some Entry

Customer Name :   Jim Mouse
DOB           :   12/01/1970

Column1            Column2            Column3
200                Assignment        Entered works

Customer Name :   Jim Mouse
DOB           :   12/01/1970

Column1            Column2            Column3
300                Freelance         Tesing 

On following IAN steps, I attached the Image of current output.

回答1:

As you have seen, by default a List will repeat for each row in the Dataset.

With a version of your data:

I have created a blank report with a List:

Note the three dotted lines in the List item and the Details group, indicating there is no grouping item. We want to change this to group on Customer:

After apply this change you can see the List and group have changed:

Now this item will repeat for each Customer, not each row. We can now add in the text box for Customer, which will show once per group, and a table, which will display all rows for that Customer:

Which works as required:

You can add page breaks to the group if required.