BI Tips: Using Parameters to Control Report Objects
There are endless possibilities on how Parameters can enhance and customize your reports. First off, it’s important to understand the difference between system parameters and user parameters.
System Parameters are created internally by Report Builder. An example of this is when a parameter is enabled within query designer (see above photo). The system then auto-creates a corresponding parameter to control the filter once the query designer is exited (see below photo).
User Parameters are created by you, the report developer, and can be used in a number of ways. Put simply, think of a user parameter as a placeholder where you can store values or expressions and then uses that placeholder in other calculations.
A common use for user parameters is to show/hide an object.
In the example below, I created a parameter name Show/Hide and assigned two available values. (To create a parameter, right-click on the Parameters folder.)
Now I can use these values to control the visibility of any object. Let’s say I have column that I want to show/hide based on this parameter. By right-clicking on the column and selecting “Column Visibility”, I can write an expression based on this new parameter.
Choose the third option, “Show or hide based on an expression” and click on the “fx” button.
Your expression would be similar to this:
=Parameters!ShowHide.Value = “Hide”
If you have any questions about this feature or BI in general, please contact your Account Manager directly.