问题
I have a report that is displayed with a grouping per location. For example, I have stores grouped by geographic regions.
I would like conditionally to remove the group so that, instead of being grouped by regions, all the stores are simply listed alphabetically.
Is this possible? The regions are in a group and the stores are in a detail group.
回答1:
In the control with the grouping, you simply make the grouping conditional on something, usually on a parameter. And also change visibility of the grouping header/footer.
In the "Grouping and Sorting" dialog for the control you'd have the grouping something like
= iif(Parameters!GrpByRegion.Value, Fields!StoreRegion.Value, "")
In the "Hidden" property for the grouping header (say in a table) you'd have
= iif(Parameters!GrpByRegion.Value, false, true)
来源:https://stackoverflow.com/questions/4745217/conditionally-removing-a-grouping-in-reporting-services