Search code examples
sql-servervisual-studioreporting-servicessql-server-data-tools

Run reports on all available parameter value


I set several parameters for a report created in SSDT (SQL Server Data Tools). How can I run the report on all available parameter value and form a comprehensive report with each case per session? Thanks a lot.

E.g. a report called 'data growth' with parameters @database and @tablename. A serial of available names for these two parameters. I would like to compile the report with all cases.


Solution

  • You have two options.

    1.
    Manually include an additional All option into your parameter selections, either by adding a value in the menus or unioning the value if your parameter options are data driven, and set the source query to return all results when selected.

    2.
    Change your parameter to a multi-value parameter and change your source query to use where database in(@database) which will enable all combinations of your parameter to be selected, including all.