Hiding group headers in a heirarchy while still showing sub-groups/detail
Hi,
I have a row group heirarchy a bit like this (the real thing is a lot more deeply nested):
Country
|
|--> State
|
|---> City
I'm trying to make it so I can conditionally hide a group header column showing, for example, states, but maintain the visibility of the City row headers and all the details. I'm not sure if I have the terminology right, but based upon a parameter, instead
of showing this:
Country
State
City
Cost
Usage
USA
CA
Los Angeles
123
234
USA
OR
Portland
453
123
Canada
BC
Vancouver
123
423
It should be possible to show this:
Country
City
Cost
Usage
USA
Los Angeles
123
234
USA
Portland
453
123
Canada
Vancouver
123
423
Make the grouping conditional seems to have no effect on the visibility of the "State" column even when the condition evaluates to Nothing. For normal columns I can right-click on the gray column header thing at the top of the tablix and click on Column
Visibility, but that item is grayed out for row header columns. Setting the tablix member's "Hidden" property to true hides all the sub-groups and details, which I don't want.
Is there any way to achieve this?
Thanks in advance for any help.
July 27th, 2012 8:32pm
Hi Shaun !
What you can do here, you can achieve this by using Dynamic Grouping in SSRS. Currently your 2nd row group is on State Column now what you can do is write an expression in group properties to based it on parameter value. Then you group will be create depending
on your parameter selection; Here is the sample expression you can write;
=Switch
(
Parameters!YourParamName.Value = 1, "State" ,
Parameters!YourParamName.Value = 0, "City"
)
By using this expression you can conditionally control your group. Hopefully by this help you will be able to accomplish your task.
Please let me know if this helps. Hopefully i have answered you correctly.
Thanks, Hasham
Free Windows Admin Tool Kit Click here and download it now
July 28th, 2012 5:28pm
Okay, but it still needs to be possible to show all three columns (in this example, I actually have more), so I still need three groups, but if I only have 2 groups selected, the third group column is still visible even if the group condition evaluates
to Nothing.
July 28th, 2012 6:18pm
HI Shaun !
Yes you can still do that. What you need to do here, you can only set the Column Visibility once its in the Columns List of your matrix / tablix.
Now once you have all these Row Groups created. You need to add more columns if you understand the column side of your tablix that is separated by dots.
Now put both State and City in separate columns now you will be able to see the column visibility option as well.
Also, as you don't need to hide the column State just set the Group expression to what i have written in above post and in your columns you have Country, State, City all 3 lined up. So even your 2nd group evaluates to city it will still show the State Column.
Please let me know if this helps. Hopefully i have answered you correctly.
Thanks, Hasham
Free Windows Admin Tool Kit Click here and download it now
July 28th, 2012 6:28pm