Execute stored procedure from within rendered SSRS Report.

Posted on 2009-04-27
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
    LVL 26

    Accepted Solution

    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.
    LVL 2

    Author Comment

    Thanks, I have done similar before, this time I am trying to keep all in one report.
    LVL 26

    Expert Comment

    by:Chris Luttrell
    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.
    LVL 2

    Author Closing Comment

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
    In this article I will describe the Copy Database Wizard 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.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now