Click here to Skip to main content
11,415,074 members (74,718 online)
Click here to Skip to main content

Using StoredProcs with Parameters in SQL Reporting Service 2005

, 18 Sep 2007 CPOL
Rate this:
Please Sign up or sign in to vote.
SQL Reporting Service provides an option for using stored procedure in the SQL Server instead of using a query in the report.This article takes you through step by step process of creating a dataset which used a stored procedure with parameters.

Introduction

SQL Reporting Services are very powerful when it comes to the options available for generating reports. We can use stored Procedure in the database to create a dataset. This article takes you through a step by step procedure on how to achieve this.

Background

For a detailed article on Defining Report Datasets, go to this link on MSDN. For a detailed article on Defining Report Datasets for a SQL Server Relational Database, go to this link. In this article, I will focus on Defining Report Datasets for a SQL Relational Database, using stored procedures with parameters.

Using the Code

  1. In the designer, select New <DataSet...>:

    Screenshot - newdataset.jpg

  2. On the Query Tab
    • For the Command Type, select Stored Procedure.
    • Enter the name of the procedure (In the Query String: text box) you want to call but don't worry about the parameters here.

    Screenshot - storedprocedure.jpg

  3. On the parameters tab, create a parameter (name should include the @) for each parameter your sproc uses:

    Screenshot - storprocparameters.jpg

Now you are ready to use the dataset for SQL Server Stored Procedures with parameters.

Points of Interest

The following link helped me:

History

  • Version: 0.0.1.0 (I might add more screen shots and more details depending on the response)

License

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

Share

About the Author

ganti.r
Web Developer
India India
No Biography provided

Comments and Discussions

 
QuestionThis is not an article Pin
mrdesjardins24-May-13 6:17
membermrdesjardins24-May-13 6:17 
QuestionGood Article Pin
Alireza_136225-Nov-12 17:35
memberAlireza_136225-Nov-12 17:35 
GeneralMy vote of 4 Pin
khan mohd faizan29-Feb-12 22:51
memberkhan mohd faizan29-Feb-12 22:51 
QuestionHow to pass a list of parameter to the dataset Pin
T.Ashraf5-Sep-08 7:42
memberT.Ashraf5-Sep-08 7:42 
QuestionSP query in SSRS dataset query Pin
shahid hameed23-Jul-08 18:11
membershahid hameed23-Jul-08 18:11 
QuestionPictures are not being shown Pin
Andreas_Manthey7-Mar-08 5:12
memberAndreas_Manthey7-Mar-08 5:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150427.4 | Last Updated 18 Sep 2007
Article Copyright 2007 by ganti.r
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid