Execute stored procedure from within rendered SSRS Report.

Posted on 2009-04-27
Medium Priority
Last Modified: 2012-05-06
I am try to see if running a stored procedure from a rendered report is possible.  I have done this before using a sub-report, but I want to know if it can be done in the same report.  Here is a scenario:  A report runs and if the rows date added column < 03/01/2009, you could click on a Deactivate column and that would execute a separate stored procedure, that returns a message.  Any ideas?
Question by:simprick
  • 2
  • 2
LVL 27

Accepted Solution

Chris Luttrell earned 375 total points
ID: 24244801
You can have links in your reports normally used for Drill Down reports that call another Report that would call the stored procedure behind it.  If you only added that link when appropriate, "date added column < 03/01/2009," and passsed the needed values so that the report that it called could run the stored procedure to Deactivate whatever and return info to be displayed in the new report as the message you wanted, you could do what you want.  I hope that helps give you an idea of what to do, I have not taken it that far myself but it should work.

Author Comment

ID: 24249569
Thanks, I have done similar before, this time I am trying to keep all in one report.
LVL 27

Expert Comment

by:Chris Luttrell
ID: 24251286
I know it is not what you want to hear, but I am failrly sure you can not do that.  Even on the "Expert" MS sites where their MVPs have described psudo interactive reports, they have done it with one report calling another version of the report and passing values back and forth so the other report can requery with each "page"/report change.  If you find something different, let us know, I have looked for this before with no luck.

Author Closing Comment

ID: 31575067
I agree with CGLuttrell, I have not found a way to do this.

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question