Click here to Skip to main content
6,290,721 members and growing! (13,277 online)
Email Password   helpLost your password?
Database » Database » SQL Server     Intermediate

Data Driven Subscriptions in SQL RS 2000 Standard

By Jason Selburg

How to implement data driven subscriptions in SQL RS 2000, Standard edition.
C++, SQL, Windows, Visual Studio, SQL 2000, DBA, Dev
Posted:12 May 2006
Updated:15 May 2006
Views:12,636
Bookmarked:12 times
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
3 votes for this article.
Popularity: 1.67 Rating: 3.50 out of 5

1

2
1 vote, 33.3%
3
1 vote, 33.3%
4
1 vote, 33.3%
5

Introduction

Do you have SQL Reports that need to go to different people but each person's report has different parameters? Don't have the resources to purchase the Enterprise edition of SQL Server 2000? The only solution available in the Standard edition, besides writing your own front end in .NET, is to create a subscription for each unique report, person, and parameter. After only a short amount of time, you've got a ton of subscriptions to manage.

Well, that's the situation I was in, and it was quickly becoming a nightmare managing all of the subscription change requests. I started thinking "Reporting Services is just a regular ol' database with an ASP.NET front end. There's got to be a way to do it...".

Well, Eureka! It seems the subscription information is stored in a table named, of all things, "Subscriptions", and the parameter information is stored in, yep, "Parameters". Those tricky Microsoft guys!

Anyway, I wrote a stored procedure that will look for a predefined text in the subscription and replace it with what you supply. It may not be as pretty as the version in the SQL Server Enterprise edition, but this one gets the job done, and it is very useful!

I have not included any error checking, and currently, this stored procedure only allows for one parameter. Feel free to modify the code as you see fit. Any suggestions or comments are welcome, email me.

Thank you, and I hope this helps or at least gives you ideas on where to go next.

How to use the code

  1. Create a new subscription for the report that you want to set up a data driven subscription for. Use the following settings:
    To Address:            |TO|
    Carbon Copy Address:   |CC|
    Blind Copy Address:    |BC|
    Reply To Address:      |RT|
    Comment / Body:        |BD|
    Parameter 1:           |P1|

  2. Now, set the schedule of the report to run once.

  3. Set the beginning date and the ending date to a date prior to today.

  4. In the Enterprise Manager, find the job you just created. It will have a Last Run Status of �Unknown�, and the Next Run Date will be �Date and time are not available�. This job's name is what you�ll need to pass to the stored procedure as the Schedule ID.
  5. To execute the subscription, simply call the stored procedure passing these values.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Jason Selburg


Member

Occupation: Web Developer
Location: United States United States

Other popular Database articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 2 of 2 (Total in Forum: 2) (Refresh)FirstPrevNext
GeneralData-Driven Subscriptions PinmemberSreedevi Pidaparthi1:01 12 Dec '08  
GeneralData Driven Subscriptions in SSRS 2005 PinmemberDilip Mysore Devaraj22:51 25 Oct '08  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 15 May 2006
Editor: Smitha Vijayan
Copyright 2006 by Jason Selburg
Everything else Copyright © CodeProject, 1999-2009
Web13 | Advertise on the Code Project