Back to Devexpress

Add Dashboard Parameters and Filter Data

reportserver-118944-create-dashboards-add-a-dashboard-parameter-and-filter-data.md

latest5.7 KB
Original Source

Add Dashboard Parameters and Filter Data

  • Oct 05, 2022
  • 5 minutes to read

This topic explains how to create a dashboard parameter and use it to filter dashboard items and data at the data source level.

Create a Dashboard Parameter

Follow the steps below to create a dashboard parameter.

  1. Invoke the dashboard menu and select Parameters.

  2. In the Parameter List section, click Add New Parameter.

  3. Specify the parameter’s settings:

Parameter Settings

The following settings are available for dashboard parameters:

SettingsDescription
NameSpecifies the parameter name. This name is used to refer to the parameter in the filter expression.
DescriptionSpecifies the parameter description displayed in the Parameter column of the Dashboard Parameters dialog.
VisibleSpecifies whether the parameter is visible in the Dashboard Parameters dialog.
Allow NullSpecifies whether a null value can be passed as a parameter value.
Allow MultiselectSpecifies whether multi-selection is enabled for the parameter.
Select All ValuesSpecifies whether all parameter values should be selected in the initial state of the dashboard. Note that this option is in effect when Allow Multiselect is enabled.
TypeSpecifies the parameter type.
Default ValueSpecifies the default parameter’s value.
Look-Up SettingsSpecifies the parameter look-up settings.

Depending on the selected Look-up Settings option, specify the following settings:

No Look-UpA user specifies the parameter value in the Dashboard Parameters dialog.Static ListA user selects a parameter value from a static list. To add predefined parameter values, use the + button.Dynamic List

A user selects a parameter value defined in a data source. To get access to data source values, specify the following options:

SettingsDescription
Data SourceSpecifies the data source for the dashboard parameter.
Data MemberSpecifies the name of the data member with the parameter values.
Value MemberSpecifies the name of the data field for the parameter values.
Display Member (optional)Specifies the name of the data field used for parameter value descriptions displayed in the Dashboard Parameters dialog.
Sort By and Sort Order (optional)Allows you to specify the data member used to sort parameter values and the required sort order.

Filter a Dashboard Item

Filters that are applied to a dashboard item affect only this item.

To filter an individual dashboard item, follow the steps below:

  1. In the Dashboard Item Menu , invoke the Filters menu. In the Item Filter section, click the Edit button to add a filter:

  2. In the invoked Filter Editor , specify filter criteria.

To change the parameter’s value, click the Dashboard Parameters button in the dashboard title to invoke the Dashboard Parameters dialog. Select the parameter value and click Submit to pass the corresponding value to the filter expression.

Filter a SQL Query

To filter dashboard data at the data source level, follow the steps below:

  1. On the Data Sources page, select a data source. Click the Edit button for the query that you want to filter.

  2. In the invoked Dashboard Data Source Wizard dialog, click Run Query Builder.

  3. In the Query Builder , switch to the Query Properties section and click the ellipsis button for the Filter property. In the invoked Filter Editor , construct an expression.

  4. On the following Data Source Wizard page, bind the created query parameter to the dashboard parameter. In the parameter’s Type field, select Expression. Click the ellipsis button for the Value property.

Select the parameter value in the Dashboard Parameters panel and click Submit to filter the dashboard.

Create a Multi-Value Parameter

You can create a multi-value dashboard parameter.

To enable a dashboard parameter to accept multiple values, check the parameter’s Allow Multiselect option in the parameter’s settings:

Now you can use the created parameter to filter a dashboard item or a data source. For this, use Is any of or Is none of operators in the filter expression.

The image below shows how to customize the filter expression created earlier so that the SalesPerson data field is compared to all dashboard parameter values.

Open the Dashboard Parameters dialog and select one or more values in the parameter’s look-up editor. Click Submit to pass the corresponding values to the filter expressions.

User-Specific Functions

The Report and Dashboard Server has functions that allow you to access information about the current user. For more information, refer to the following topic: User-Specific Functions.

See Also

Export the Dashboard and Its Items