Udostępnij za pośrednictwem


How to: Add, Edit, or Delete a Report Parameter (Report Designer)

To add or edit a report parameter

  1. On the Report menu, click Report Parameters.

    Note

    If the Report menu is not available, click within the report design area.

  2. Select the report parameter, or click Add to add a new parameter.

  3. In Name, type the name of the parameter.

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

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

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

  7. For Available values, select Non-queried to provide a static list of values from which the user can choose a value, or select From query to provide a dynamic list from a query.

    • If Non-queried is selected, type a list of labels and values. The Label property contains the text that is displayed to the user; Value is the value that is passed to the report server for the parameter.

    • If From query is selected, select a dataset, a value field to map to the parameter value, and a label field to display to the user.

      Note

      The dataset used for this option is usually created specifically for the report parameter. For information about datasets, see Defining Report Datasets.

  8. For Default values, select Non-queried to provide a static default value, or select From query to provide a dynamic default value from a query. To provide no default value, select None.

    • If Non-queried is selected, type a value or expression to use for the default value.

    • If From query is selected, select a dataset and a value field to map to the default parameter value.

    • None is selected, the value used for the default value is null.

      Note

      The dataset used for this option is usually created specifically for the report parameter. For information about datasets, see Defining Report Datasets.

To delete a report parameter

  1. On the Report menu, click Report Parameters.

    Note

    If the Report menu is not available, click within the report design area.

  2. Select the report parameter that you want to delete, and then click Remove.

See Also

Concepts

Report Designer How-to Topics

Other Resources

Working with Parameters in Reporting Services
Report Designer F1 Help

Help and Information

Getting SQL Server 2005 Assistance