Solved

Call an SSRS subscription from stored procedure

Posted on 2014-11-06
1
1,655 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
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

746 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

12 Experts available now in Live!

Get 1:1 Help Now