Design SSRS Parameterized Report

Design Parameterized Report using SSRS 2008

In this article, we will see how to create a SSRS report with parameters. We will create the parameters and then add these parameters to our reports, in different ways. For this demonstration, we will use SQL Server 2008 database 'AdventureWorks' for designing the report as well as parameters.

This article is a continuation of 'SQL Server Reporting Services without using the Wizard'. If you have not gone through it, I will highly recommend you to go through it first and then start with this article.

We are going to expose the postal code as a parameter. This means, we will see the address of only the entered postal code.

Modify the query in the dataset, to make PostalCode as a parameter



Once you click OK, go to the parameters folder in "Report Data" - you will find that @postalcode automatically appears in the "Parameters" Fields.

Lets explore more about the parameter. Double click on @postalcode.
This is place, where you configure, how your parameter should behave - should it allow blank values or null values etc.
You can configure the visibility, data-types, default values etc. Lets leave it as it is for now.


Click preview, and enter in a postal code (91373 for example)


Note: Observe that the parameter appears as a text box here. If you want pre-configured values (in a dropdown), double click on the parameter in "ReportData" --> Parameters (here, @postalcode) and click "Available Values"/"Default value" and click "Get values from a query". You can choose your dataset and corresponding column. Create multiple datasets to suffice your parameter value requirements.

Share this

Related Posts

Previous
Next Post »