09-09-2017, 09:27 AM
Multi-value parameters allow you to select more than one value for a report parameter. To modify the BusinessPersonID report parameter, you change the query in the AdventureWorks2008R22008 dataset to test @BusinessPersonID on the selected value set instead of a single value, and check the multivalue property of the report parameter. To modify the DayoftheWeek report parameter, you will check the multivalue property, set the available values for a new dataset, and provide an expression for the default values. A new dataset will be created to provide available values for the DayoftheWeek parameter. Finally, it will add a text box to the report to display the values of the parameters of the DayoftheWeek selections made.
To add a multi-valued parameter
1. In Report Builder, open the report to which you want to add the multi-value parameter.
2. Right-click the dataset in the report, and then click Dataset Properties
3. Add a variable to the dataset query by editing the text of the query in the Query box or by adding a filter by using the query designer. For more information, see Create a Query in Relational Query Designer.
4. A dataset parameter for an embedded dataset or a shared dataset is automatically created for the query variable. A report parameter is automatically created for the dataset parameter.
5. In the Report Data pane, expand the Parameters node, right-click the report parameter that was automatically created for the dataset parameter, and then click Parameter Properties.
6. On the General tab, select Allow Multiple Values to allow a user to select more than one value for the parameter.
7. (Optionally) On the Available Values tab, specify a list of available values to display to the user.
A list of available values limits the options that a user can perform only to values that are valid for the parameter. For several values, the top of the list begins with a Select All function so that the user can select or delete all values with a single click. If you choose to obtain the available values for the report parameter of a dataset query, be sure to select a dataset that does not contain the query variable associated with the same report parameter.
To add a multi-valued parameter
1. In Report Builder, open the report to which you want to add the multi-value parameter.
2. Right-click the dataset in the report, and then click Dataset Properties
3. Add a variable to the dataset query by editing the text of the query in the Query box or by adding a filter by using the query designer. For more information, see Create a Query in Relational Query Designer.
4. A dataset parameter for an embedded dataset or a shared dataset is automatically created for the query variable. A report parameter is automatically created for the dataset parameter.
5. In the Report Data pane, expand the Parameters node, right-click the report parameter that was automatically created for the dataset parameter, and then click Parameter Properties.
6. On the General tab, select Allow Multiple Values to allow a user to select more than one value for the parameter.
7. (Optionally) On the Available Values tab, specify a list of available values to display to the user.
A list of available values limits the options that a user can perform only to values that are valid for the parameter. For several values, the top of the list begins with a Select All function so that the user can select or delete all values with a single click. If you choose to obtain the available values for the report parameter of a dataset query, be sure to select a dataset that does not contain the query variable associated with the same report parameter.