SSRS – Calling Stored Procedures and passing parameters to the same in SSRS Reports – Part 4


In this article, I would like to explain about how to use stored procedures and how to pass parameters to a specified report. This articles explains creating Stored Procedures in Management Studio and Implementing SPs in SSRS Reports and Passing Parameters to the corresponding reports for beginners who are struggle to use SP in SSRS Reports.

SSRS – Implementing Stored Procedures and passing parameters to reports



This articles explains creating Stored Procedures in Management Studio and Implementing SPs in SSRS Reports and Passing Parameters to the corresponding reports for beginners who are struggle to use SP in SSRS Reports.

Before we going to use Stored Procedure within a SSRS Report, we make sure whether we have created Stored Procedure in SQL Server Management Studio. If not, please do the following:

Open SQL Server Management Studio

Create a new SP and execute and confirm it like working fine.

SSRS_SP1.JPG

Create a new Report using SQL Server Business Intelligence Studio

( If you new, kindly refer previous articles )

Open Solution Explorer Window

Right Click Reports

Add New Item…

SSRS_SP2

Add new Report in Add New Item Window

SSRS_SP3

Add in Data Tab within Report1.rdl[Design] Window

SSRS_SP4

Do the Data Source Settings

Note: If you not aware, refer Part 1

http://www.dotnetspider.com/resources/42873-SSRS-SQL-Server-Reporting-Services-Create.aspx

After successfully finished, then,

Click Edit Selected Dataset

SSRS_SP5

In Dataset Window ( and in Query Tab )

Change Command type: as Stored Procedure

Type created stored procedure name in Query string:

SSRS_SP6

Click Parameters Tab

Specify parameters Name and Value (see figure)

Click Ok

SSRS_SP7

Click Layout Window

And Do your Own Designing

SSRS_SP8

Finally click Preview

Here parameter value in the corresponding textbox and click view Report

SSRS_SP9

Change parameter value and enjoy reports

SSRS_SP10



Reference: http://www.dotnetspider.com/resources/42966-SSRS-Creating-subreport-managing-multiple.aspx


Comments

Guest Author: Tabbu09 Mar 2013

Great step by step article. Thank you!



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: