Partilhar via


How to trigger a subscription in Reporting Services 2000

RS 2000 doees not support custom events. What this means is you cannot, on the face of it, trigger a subscription on demand. 

Luckly, we thought of this. The method of doing this is not particularly pretty, but it does work.

Eventing in Reporting Services is currently (2000 and 2005) limited to two events: SnapshotCreated and TimedSubscription. The TimedSubscription event is interesting because it can be submitted to the report server using the FireEvent SOAP API. You can use this property to programmatically submit events to Reporting Services. 

What you need:

1) A shared schedule that will never fire. This is easy – just create a shared schedule that executes once and that starts in the past (e.g. yesterday). Take a note of the schedule ID that you get from creating this schedule.

2) A subscription to deliver the report want. You can use a standard or data-driven subscription. You'll get a Subscription ID back.

3) Now, set the subscription in #2 to be triggered by the shared schedule created in #1.

         a. Programmatically you would set the EventType to “TimedSubscription” and the MatchData to the schedule ID.

4) From you application, call the FireEvent method on the report server SOAP API. You’ll need to grant the process that calls FireEvent the “Generate events” System task.

         a. When calling FireEvent, set EventType to “TimedSubscription” and MatchData to the Subscription ID from #2.

 Result should be that your application can trigger a subscription to run on the report server.

Comments

  • Anonymous
    January 31, 2007
    A customer came to the SQL Server Customer lab to investigate a problem with one of the feature I’m responsible

  • Anonymous
    November 11, 2008
    I was troubleshooting a report the other day and found a great post from Lukasz on troubleshooting SQL Server Reporting Services. Not to take anything away from him... I did not write the post below. I reposting it for my own reference...General process