how to use the stored procedure on ssrs
is it possible for me to use a already created stored procedure to develop reports using SSRS. if so how do i do that? any help on this would be really appreciated thanks.
February 23rd, 2011 2:08pm

yes, simply create a dataset and change the command type to stored procedure.
Free Windows Admin Tool Kit Click here and download it now
February 23rd, 2011 2:14pm

Sure, this is the preferred method. As Mr. Willis said, simply create a Dataset that invokes the stored procedure by name. When editing the query, simply enter the name (and just the name) in the Edit as Text dialog. The BI tools (or Report Builder) will build the correct stored procedure invocation TSQL. Of course, this assumes you have sufficient rights to call the SP. Consider that the tools sometimes have difficulty building the Parameters collection based on a SP so you might have to revisit the Dataset and refresh the fields. Just make sure that the report parameters collection is fully populated. FMI: Come to my Progressive BI Reporting Services Webinar... __________________________________________________________________ William Vaughn Mentor, Consultant, Trainer, MVP http://betav.com http://betav.com/blog/billva http://www.hitchhikerguides.net Hitchhikers Guide to Visual Studio and SQL Server (7th Edition) Please click the Mark as Answer button if a post solves your problem!
February 23rd, 2011 2:22pm

Hi it is very similar to your normal sql script. You just have to select "StoredProcedure" in Command type. Don't write "Exec before your SP name, if you are selcting command type "StroedProcedure" if you select Command type as "Text" then you have write "Exec" before your SP name. Example 1) Just write in SQL Pane: SP_GetProjectDetail ------------------ if sp does not have any paramatere. 2) Just write in SQL Pane: SP_GetProjectDetail @Startdate, @FinishDate------------------ if sp does have any paramatere. Sachin Vashishth MCTS
Free Windows Admin Tool Kit Click here and download it now
February 23rd, 2011 2:33pm

Ah, no. You do NOT enter the parameters when specifying the name of the SP when using Command Type "stored procedure". The BI wizards think the entire string is the name of the SP. As I said, the wizard queries SQL Server for the details of what parameters are needed and builds a report parameters collection to match.__________________________________________________________________ William Vaughn Mentor, Consultant, Trainer, MVP http://betav.com http://betav.com/blog/billva http://www.hitchhikerguides.net Hitchhikers Guide to Visual Studio and SQL Server (7th Edition) Please click the Mark as Answer button if a post solves your problem!
February 23rd, 2011 3:21pm

Ah, no. You do NOT enter the parameters when specifying the name of the SP when using Command Type "stored procedure". The BI wizards think the entire string is the name of the SP. As I said, the wizard queries SQL Server for the details of what parameters are needed and builds a report parameters collection to match.__________________________________________________________________ William Vaughn Mentor, Consultant, Trainer, MVP http://betav.com http://betav.com/blog/billva http://www.hitchhikerguides.net Hitchhikers Guide to Visual Studio and SQL Server (7th Edition) Please click the Mark as Answer button if a post solves your problem!
Free Windows Admin Tool Kit Click here and download it now
February 23rd, 2011 3:21pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics