Solved

Call an SSRS subscription from stored procedure

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how the fundamental information of how to create a table.

696 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