Solved

Dynamic changing of row grouping using vaules from parameter

Posted on 2011-03-08
5
827 Views
Last Modified: 2012-05-11
Hi All,

I want to change the  row grouping values(in a matrix report) dynamically depending on the values of a parameter.
For EX. I Have a column grouping for category for total price in a matrix report and i have a row grouping on States . But i want to change the row grouping from states to customers depending on the value passed in the parameter. How can i do that?

- Karru
0
Comment
Question by:skarru
  • 3
  • 2
5 Comments
 
LVL 39

Expert Comment

by:lcohan
ID: 35073871
For that you need to write a SQL SP that will take that report parameter and use it inside the SQL SP to build dynamic SQL code that you execute from there.
0
 

Author Comment

by:skarru
ID: 35074008
The fields i have taken in matrix are from a sp...so my doubt is will the report accept value from another sp for the same field?
0
 
LVL 39

Expert Comment

by:lcohan
ID: 35074042
Ok, so you should modify that SP to include the new parameter and if not null build dynamic code then execute with new group by.
0
 

Author Comment

by:skarru
ID: 35075262
This is my stored procedue can you please let me know how to modify it according to group. SP.txt
0
 
LVL 39

Accepted Solution

by:
lcohan earned 300 total points
ID: 35083231
Please see updated attached - I changed it to CREATE and added _NEW suffix to not touch existing by accident. You may need to addapt/adjust your code but this is what I was talking about and hopefully suit your needs.
sp-new.sql
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Hi, I have heard from my friends that it’s not possible to create Label Printing report using SSRS. I am amazed after hearing this words not possible in SSRS. I googled lot and found that it is possible to some of people know about the Report Bui…
A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 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

20 Experts available now in Live!

Get 1:1 Help Now