|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, February 02, 2011 12:25 PM
Points: 10,
Visits: 72
|
|
Hi,
I'm developing a SSRS 2005 report, where grouping depends on the value selected as the parameter
Ex: Parameter dropdown has 2 values i.e., 1) state and 2) company 1) If i select state, then the grouping should be as follows state and then company 2) If i select company, then the grouping should be as follows Company and then state can we dynamically change grouping depending on the parameter value selected ?
Thanks Pravin
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, December 28, 2010 4:35 AM
Points: 7,
Visits: 71
|
|
Hi Pravin,
Do you want to perform grouping in sql query or else in your report layout?
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 12:49 PM
Points: 370,
Visits: 1,657
|
|
I do this a lot in my reports. You can even tailor the layout of your headers and Detail areas using the same expression. Enter this in the grouping expression box.
If you just have the two Choices: =iif(parameters!Parametername.value='State', Fields!State.Value,Fields!Company.Value)
If you jave more than two =iif(parameters!Parametername.value='State', Fields!State.Value,Fields!Company.Value) iif(parameters!Parametername.value='Company', Fields!Company.Value, Etc. ) )
When I do something like this I also add a extra Header row and details row for each choince i the drop down. Then I Set the Visibility I useing the same expression =iif(parameters!Parametername.value='State', False,True) For the State Header and Details row =iif(parameters!Parametername.value='State', False,True) For the Company Header and Detail Row
This gives you a lot of control over what gets displayed when either group is selected
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 11:21 AM
Points: 2,163,
Visits: 2,148
|
|
| Thanks Steve, I think that will come in very helpful for me in the future too...
|
|
|
|