Solved

SQL Report Builder - Matrix Report

Posted on 2009-04-13
2
518 Views
Last Modified: 2012-05-06
Hello,

I'm new to SQL Server Reporting Services. I have created a Report model and using the Report Builder, I'm trying to create a Matrix report from a Report Model. The matrix report I have created looks like below.

                    Diagnosis
------------------------------------------------------------------------
Age             Grade1        Grade2          Grade3          Total
------------------------------------------------------------------------
29                  1                                                               1
30                                        1                                         1
31                  1                                                               1
32                                                             1                    1

Total              2                     1                  1                     4


I have added the field 'Age' as the row group and 'Diagnosis' as the column group. Age has values 29, 30, 31, 32... and Diagnosis has values Grade1, Grade2 Grade3.....In the report builder, I would like to group based on the row values(grouping on 'Age') and I would like my report to be displayed like below. Any help is grately appreciated. Many Thanks.


                    Diagnosis
------------------------------------------------------------------------
Age             Grade1        Grade2          Grade3          Total
------------------------------------------------------------------------
0-30                  1                    1                                        2
31-40                1                                        1                    2
40-50                                                                                

Total                  2                    1                  1                    4
0
Comment
Question by:pnadakuditi
2 Comments
 
LVL 12

Assisted Solution

by:udayakumarlm
udayakumarlm earned 500 total points
Comment Utility
create a table which will have the age range values and the grade values in SQL. use the table in the reporting server.
you can not create a range in Reporting server.
0
 

Accepted Solution

by:
pnadakuditi earned 0 total points
Comment Utility
Hi,

I was able to find a solution for this.. I basically edited the formula for the row group 'Age' using a switch statement to look like this...

SWITCH(AND(Age >=0, Age <=30), "0-30", AND (Age >=31, Age <=40), "31-40", AND(Age >=41, Age<=50), "41-50")

Thanks for your time.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
It is helpful to note: This is a cosmetic update and is not required, but should help your reports look better for your boss.  This issue has manifested itself in SSRS version 3.0 is where I have seen this behavior in.  And this behavior is only see…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now