Sdílet prostřednictvím


How to: Associate a Query Parameter with a Report Parameter

When you create a dataset query that contains a query parameter, a report parameter with the same name is automatically created for you, and the query parameter is bound to the report parameter. This enables a user to enter a value that passes directly to the query.

If you rename a report parameter that is bound to a query parameter, you need to manually link the query parameters to the renamed report parameter by using the procedure in this topic.

To associate a query parameter with a report parameter

  1. In the Report Data pane, right-click the dataset, click Dataset Properties, and then click Parameters.

    Note

    If the Report Data pane is not visible, click Report Data on the View menu.

  2. In the column Parameter Name, find the name of the query parameter. Parameter names are automatically populated based on the query. Every time you change the query, it is checked for new query parameters. Query parameters that you create manually are not changed when the query changes.

    • In Parameter Name, find the query parameter name as it exists in the query. You can also manually add a new query parameter and enter a name.

    • In Parameter Value, type or select an expression that evaluates to the value to pass to the query parameter. This is typically the name of the report parameter.

      Note

      You are not limited to report parameters as values for a query parameter. You can use any expression that evaluates to a value for the parameter value.

  3. Repeat step 2 for additional query parameters.