Search code examples
visual-studioreporting-servicessql-server-data-toolsssrs-tablix

Multiple tablix for report


i have the following scenario i am trying to simplify using Visual Studio and Microsoft BI Stack (SSRS).

I have a Dataset as follows.

Year    Employee    Sales
1       A           5,000,000
2       A           7,500,000
3       A           6,500,000
1       B           3,500,000
2       B           5,000,000
3       B           8,000,000
1       C           5,750,000
2       C           7,500,000
3       C           6,500,000
1       D           4,500,000
2       D           5,500,000
3       D           6,100,000

I am trying to create a report whereby, a single report would span 3 Tablix inside report body when run to display as follows.

Year 1

Year    Employee    Sales
1       A           5,000,000
1       B           3,500,000
1       C           5,750,000
1       D           4,500,000

Year 2

Year    Employee    Sales
2       A           7,500,000
2       B           5,000,000
2       C           7,500,000
2       D           5,500,000

Year 3

Year    Employee    Sales
3       A           6,500,000
3       B           8,000,000
3       C           6,500,000
3       D           6,100,000

Now i know i could replicate the Tablix 3 times in the report body, but that would be a bad idea when it comes to maintaining this report.

In the effort to avoid repeating myself, is there a way to loop the Tablix (N Times) in SSRS where condition would be the Year column (values 1, 2, 3.....)?


Solution

  • Following are the steps :-

    1. Insert a List. Group it by the Year.
    2. Put your tablix inside the list.

    This should do it.