Click here to Skip to main content
15,891,951 members
Articles / Database Development / SQL Server / SQL Server 2008
Tip/Trick

Generation of Dynamic Parameterised Report with DropDown List using SSRS

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
7 Jun 2013CPOL2 min read 23.3K   2  
Creating a parameterised report using SSRS.

Introduction

This article helps you in creating parameterized report which loads the data dynamically. In real time the usage of this parameterized reports is very high. That initiated me to write this article.

Content

  • Generation of Parameterized Report
  • Creating Shared Data Source
  • Parameter will be a drop down which loads Dynamic Data.
  • Adding Target Server URL for Deploying

Sequential Workflow

Click Business Intelligence Development Studio >>Choose Report Server Project >>Create Project and Click >>OK.

Image 1

Adding a Report:

Project has been created and we have seen it end of right hand side. Right Click on Reports>> Add reports with desired name (Report1.rdl)

Image 2

Creating Shared Data Source:

On Clicking OK after creating a Report, it will displays an another popup which facilitates you to create data source.

Click Edit Button>>A new popup will appear and provide Instance name in first text box >> Next Select Data base name from the Drop down populated corresponding to the instance.

Click on >>Test Connection to Check provided instance is valid or Not. Don’t forget to select the check box>>Make this as a shared data source to reuse of this data source further.

Image 3

Query Design:

Design your query with a parameter and Click>>Next Choose Report Type 1.Tabular 2.Matrix>>Click

Next>>Then design Table>>Choose Style for the table.

Image 4

After following all the above steps we can see the designed table with selected style.

Image 5

Dynamic Loading of Data to the Created Parameter

To Load values for parameter in Drop down we need to create an another Data set .Rick Click on Data Source>>Add Data Set>>

Image 6

Creating another Data Set:

Write an appropriate query to to load parameter details. We can also check the query by Clicking Query designer Button.

Image 7

Now we can see the two data set one for loading the data and second data set for loading parameter values into Drop Down.

Image 8

Changing Parameter Properties:

Right Click on Parameter>>Select Parameter Properties then it will displays Property Window.

Image 9

Loading Values Into Drop Down:

Select Available Values>>Choose get values from a query >>Select Corresponding data set to


load values for Parameter>>Then Select Value Field and Label Field>>Click OK.

Image 10

Parameter Displaying Loaded values:

Once after Clicking Preview button we can view a Parameter name with associated Drop down values being loaded from DataSet2.

Image 11

Previewing Designed Report:

By providing parameter value from drop down we can get the corresponding data as shown below.

Image 12

Setting Properties Of the Project:

Right Click>>Project Name(Dynamic Report)>>This Page will appear>>Select Start Item>>Set OverwriteDatasource property to “True”>>Then provide TargetServerURL.

Image 13

Target Server URL:

For configuring URL go to>>MS SQL Server>>Configuration Tool>>Select Report Services Configuration Manager>>. Then it will opens the below Popup>>Provide necessary fields and Click>>Connect>>Go to Report Manager URL >>Copy the URL and Paste it in TargetServerURL.

Image 14

Click on to the URL it will takes you to a page through which we can use up the report.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) @ CSC
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
This is a Organisation

8 members

Comments and Discussions

 
-- There are no messages in this forum --