Solved

Call an SSRS subscription from stored procedure

Posted on 2014-11-06
1
2,003 Views
Last Modified: 2014-11-06
Hi all,

I have a simple question, is it possible to call (and email) a report in SSRS by calling a stored procedure?

There reason for this (and not just using the schedule) being that we may want to send the report only under certain circumstances, such as there actually being data to report.

We are using SQL Server 2008 R2.

Any help is greatly appreciated.

Thanks.

resourcesys.
0
Comment
Question by:resourcesys
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
resourcesys earned 0 total points
ID: 40426262
Hi all,

Found out that when you create a subscription a job is created in SQL Server Agent. So, if you find out the name of the job, you can run the following anytime to run the subscription:

USE msdb
EXEC sp_start_job @job_name = ‘D4EF7E0D-7FFB-47A5-A87A-D63F2D242A06′


resourcesys.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
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.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

734 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