Tutorial: Adding Parameters to a Report (SSRS)
In a report, parameters are used to filter data, vary appearance, and connect to related reports. When you create a report parameter and run a report, you enable the user to choose values for the report parameter. In your report, you can write expressions that refer to the value of the parameter at run time and change the data or appearance of the report. Parameters are also used when you include a link to another report or to a subreport from your main report.
This tutorial is designed to help you explore how parameters can be used to control content and appearance in a basic table report, and to show you how to pass parameters from a main report to a drillthrough report.
What You Will Learn
In this tutorial, you will add parameters to the report you created in the previous tutorial, Tutorial: Creating a Basic Table Report (SSRS). You will learn the following concepts:
How adding query parameters to a dataset query automatically creates report parameters.
How to filter data after it is retrieved from the data source.
How to provide a list of valid values for single and multivalue parameters.
How to include the values a user chooses for a single or multivalue parameter in an expression in your report.
How to add cascading parameters.
How to pass parameters to a drillthrough report from the main report.
For more information about parameters, see Parameters (Report Builder 3.0 and SSRS).
To complete this tutorial, you must run Reporting Services in native mode. If you are running Reporting Services in SharePoint integrated mode, the steps that use report server URLs will not work. For more information about Reporting Services modes, see Planning a Deployment Mode. For more information about deploying projects, see Deploying Models and Shared Data Sources to a SharePoint Site.
Your system must have the following installed to use this tutorial:
Microsoft SQL Server 2008 R2 with the AdventureWorks2008R2 database installed. SQL Server 2008 R2 samples and sample databases must be downloaded and installed before you can view or work with them. For more information, see Considerations for Installing SQL Server Samples and Sample Databases. To read about support for SQL Server sample databases and sample code for SQL Server Express, see Databases and Samples Overview on the CodePlex Web site.
SQL Server 2008 R2 Reporting Services.
SQL Server Business Intelligence Development Studio.
Business Intelligence (BI) Development Studio is not supported on Itanium-based computers. However, support for BI Development Studio is available for x64-based computers. If the SQL Server sample databases have been deployed on an Itanium-based computer, use BI Development Studio on either an x86-based or x64-based computer to modify and run the samples.
You must also have read-only permissions to retrieve data from the AdventureWorks2008R2 database.
This tutorial assumes that you have completed the tutorial Creating a Basic Table Report.
Estimated time to complete this tutorial: 60 minutes
Lesson 1: Adding Parameters to Filter Reports by Date (SSRS)
Lesson 2: Adding Parameters to Create a List of Available Values (SSRS)
Lesson 3: Adding Parameters to Select Multiple Values in a List (SSRS)
Lesson 4: Adding Cascading Parameters (SSRS)
Lesson 5: Adding Parameters to Pass to a Drillthrough Report (SSRS)