Multi-grouping reporting services

I am new to reporting services. I have 2 tables:

  • "cars" with column ids, size, volume
  • "values" with column id, carid, year, val1, val2

Entries for these tables:

Cars:
id    cartype  capacity

1     Passat   2200

2     BMW      2800

Values:
id    carid  year val1  val2

1      1     2012 100    1

2      1     2011 200    2

3      1     2010 300    3

4      2     2012 400    4

5      2     2011 500    5

      

I want to make a report that shows this:

Car Type    Capacity

Passat       2200


       2012   2011    2010

val1   100    200     300

val2    1      2      3


Car Type    Capacity

BMV       2800


       2012   2011 

val1   400    500   

val2   4      5     

      

I created a datasource with this choice:

 SELECT m.Id AS carid, m.cartype, m.capacity, v.Id AS idval, v.An, v.val1, v.val2
 FROM  car AS m INNER JOIN  values AS v ON m.Id = v.carid

      

I tried using a matrix, but I am unable to make this format. Can anyone help me get this report?

+3


source to share


1 answer


Your dataset is suitable for this report.

You need to create a List based on the Cars group, inside the list add two text boxes for car parts and a Matrix for val1, val2, etc.

A List allows you to flexibly place and move items as needed, and placing the Matrix with the Cars group means it will only include the values ​​in the area for each car. The list (and therefore the vehicle details and Matrix values ) will be repeated for each vehicle as needed.

Added after comment:

There is no way to tell what caused your error; this is really a specific implementation detail. To give an example of how this can be done, I scoffed at the report. The first step is to create a group of cars:

enter image description here

You can see that there is one Group with one Text Box . There is a Rectangle in the Textbox (Lists in SSRS are just tables with inserted rectangles). Vehicle and capacity are just Text fields . In this example I used two Matrices , but this can be done in any number of ways. Val1



enter image description here

Val2

enter image description here

End result :

enter image description here

So you can see it is very possible, you just need to understand the required grouping and how to build the matrix. Unfortunately, it is impossible to tell what caused this error, but hopefully it gives you something to accomplish.

+5


source







All Articles