Execute SSRS report from a stored procedure

  • Hello,

    I need to execute a report from a stored procedure. This report needs to be emailed out once a stored procedure runs overnight. I know that it's possible to schedule the report through the report server to run at a certain time; but I want to kick the report off once this stored procedure completes. I had read online about possibly setting up a subscription and then use that subscription to execute from the SP, but I cannot find any code that will describe how to do that. If anyone has any ideas of how this can be done (or any other options for excecuting the report from within a stored proc), I'd truly appreciate it.

    Thanks!

    Jamey

  • I assume that since the stored procedure runs overnight that it is tied to an Agent Job. Add a step to the agent job using "sp_start_job" that executes another agent job containing the report subscription. If you don't want the subscription job to run on its own just disable the job. I think you can still execute a disabled job.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply