SSRS Report: Dynamic Group By and with None option
Scenario: I want to Group By/ Group By during run time/ Optional Group by with None option: the Report dynamically chosen by the User (by User Parameter)
Solution:
Resource: http://www.erikmonchen.com/2011_05_01_archive.html, Erik Monchen
- Make sure you include all the fields for which you want to add group possibility.
- Create a parameter (user input option) called GroupBy1 and settings for the parameter:
- Data type: text
- Multiple select: No
- Available values: Add the values that you want the end users to select. The label doesn't matter what you enter, the value must be the same name as the field name in your report data: data set.
- Default value: Whichever value you think the end user wants.
- Now in the Row Group, add Parent Group and select group by: expression and type the following:
=Fields(Parameters!GroupBy1.Value).Value
==================================================================
Optional Grouping with option None:
1. Add a parameter called "GroupBy" with following values:
- Default tab:
2. Add a parent group in the SSRS with expression:
- =iif (Parameters!GroupBy.Value is Nothing,1,Fields(iif(Parameters!GroupBy.Value is Nothing, "Division",Parameters!GroupBy.Value)).Value)
- General Tab: =Fields(iif(Parameters!GroupBy.Value is Nothing, "Division", Parameters!GroupBy.Value)).Value
- Visibility tab: =Parameters!GroupBy.Value is nothing
- Visibility tab: =Parameters!GroupBy.Value is nothing
=================================================================
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home