Редактиране

Споделяне чрез


Add, change, or delete a paginated report parameter (Report Builder)

Applies to:  Microsoft Report Builder (SSRS)  Power BI Report Builder  Report Designer in SQL Server Data Tools

A paginated report parameter provides a way to choose report data, connect related reports together, and vary the report presentation. You can provide a default value and a list of available values, and the user can change the selection.

After you publish a report, you can change the default values, the available values, and other properties for a report parameter on the report server. You can provide multiple sets of default parameter values by creating linked reports. For more information, see Report parameters (Report Builder).

This article is about adding report parameters to a paginated report in Report Builder or Report Designer in SQL Server Data Tools (SSDT). You can also add report parameters to mobile reports in SQL Server Mobile Report Publisher. For more information, see Create mobile reports with SQL Server Mobile Report Publisher.

Note

You can create and modify paginated report definition (.rdl) files in Microsoft Report Builder, Power BI Report Builder, and in Report Designer in SQL Server Data Tools.

However, SQL Server Mobile Report Publisher is deprecated for all releases of SQL Server Reporting Services after SQL Server Reporting Services 2019.

Add or edit a report parameter

  1. In Report Builder or Report Designer in SQL Server Data Tools (SSDT), in the Report Data pane, right-click the Parameters node and select Add Parameter. The Report Parameter Properties dialog opens.

  2. In Name, enter the name of the parameter or accept the default name.

  3. In Prompt, enter the text that appears next to the parameter text box when the user runs the report.

  4. In Data type, select the data type for the parameter value.

  5. If the parameter can contain a blank value, select Allow blank value.

  6. If the parameter can contain a null value, select Allow null value.

  7. To allow a user to select more than one value for the parameter, select Allow multiple values.

  8. Set the visibility option.

    • To show the parameter on the toolbar at the top of the report, select Visible.

    • To hide the parameter so that it doesn't display on the toolbar, select Hidden.

    • To hide the parameter and protect it from being modified on the report server after the report is published, select Internal. The report parameter can then only be viewed in the report definition. For this option, you must set a default value or allow the parameter to accept a null value.

  9. Select OK.

Delete a report parameter

  1. In the Report Data pane, expand the Parameters node.

  2. Right-click the report parameter and select Delete.