Databases Reference
In-Depth Information
Report Parameters
Many of your reports have parameters to control all kinds of behavior. You can use parameters to alter
your query, filter datasets and tables, and even change the appearance of your reports. Reporting
Services allows you to pass this information directly via a URL request. In the earlier section, you saw a
lot about the parameter prefixes and the available values that can be sent to the Reporting Services. With
report parameters, you simply need to remove the prefix and directly call the parameter name.
In this example, the Product List Subreport accepts one parameter: SubCategoryID . You might want to
allow your users to update these parameters through a custom interface you define. When you call the
report, you will need to provide the parameter value in the URL as shown here:
http://localhost/ReportServer/Pages/ReportViewer.aspx?%2fProfessional+SQL+Reporting+
Services%2fProduct+List+Subreport&rs%3aCommand=Render&SubCategoryID=1
Let's take a look at calling the report with a SubCategoryID of 1 (see Figure 12-7).
Figure 12-7
Notice that by passing the parameters in your URL, the HTML viewer updates to reflect the values. The
parameter name that you use in the URL is defined in the report definition. Since your Report Parameter
is called SubCategoryID, that name is used in your URL.
Search WWH ::




Custom Search