Amey
Amey

Reputation: 1296

SSRS Adjacent grouping in matrix report

I have a question related to SSRS matrix report. I have data captured in the following format in the table:

Category Name Month Cost

C1 N1 M1 10

C1 N1 M2 20

C1 N1 M3 30

C1 N2 M1 40

C1 N2 M2 50

C1 N2 M3 60

C2 N3 M1 70

C2 N3 M2 80

C2 N3 M3 90

So basically it captures the category, the product name and costs for various months. What I want to have in my report is something like this:

Category Name M1 M2 M3

C1 N1 10 20 30

C1 N2 40 50 60

C1 N3 70 80 90

So this is similar to pivot on months with Category and Name as static columns. When I try to create two groups, Category and Name, in the matrix report, the Category becomes the parent group and the report groups all the products in common categories. For example I am getting something like this:

Category Name M1 M2 M3

C1 N1 10 20 30

N2 40 50 60

C1 N3 70 80 90

I don’t want above grouping. I want category c1 to be repeated for N1 and N2.
I am kind of novice in matrix report and maybe I missing some obvious group settings. Can someone please help me in this?

EDIT: I am using SSRS 2008 R2 Thanks & Regards AK

Upvotes: 0

Views: 8889

Answers (1)

Ian Preston
Ian Preston

Reputation: 39586

When you create a matrix style Tablix in SSRS it will look like this be default:

enter image description here

enter image description here

The reason C1 is displayed like this is that by default group headers are not added to the Tablix body area and are only shown once per group.

Note that Category and Name are to the left of the dotted lines:

enter image description here

See Understanding the Tablix Data Region.

Delete the two left columns. When prompted, choose Delete columns only:

enter image description here

Now, add two columns like below:

enter image description here

The tablix now looks like this:

enter image description here

Note there is no longer dotted lines between Name and Month, i.e. everything is in the Tablix body region.

Now the end result looks like your requirement:

enter image description here

Upvotes: 2

Related Questions