Data Driven Subscriptions

  • Is there an update for this sproc?

  • The Solution does not work for SQL Server 2008 Standard , Please assist

  • Thanks Jason for sharing this clever way to overcome some of the short comings in SQL Standard Edition.

    I don't mean to spam this form but I like to present an alternative from Fuel9 [/url]called Boomerang. The Boomerang framework use the SSRS (2005 or 2008) API to render reports and supports things like "file share" output and multiple reporting parameters in addition to Email/Fax/FTP/Print Server output.

    You interact with the framework in a database interface that requires just basic SQL skills and it includes a service oriented method of managing deployed "subscriptions". The standard edition of Boomerang is free.

    /N

  • Jason,

    I'm definitely interested in the revised version. If you still have it available, please send it or tell me how I could find a link.

    Thank you so much.

  • This is the most recent code I have. It may need some tweaking for 2008, I've not tested it on '08.

    http://www.sqlservercentral.com/articles/Development/2824/[/url]

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • Does this work with sql 2005 also?

  • nevermind I got it to work

  • Jason,

    I am in the same situation to implement Data Driven Subscription to a File Share while we are using SQL Server 2008 R2 Standard Edition. I'm really interested in taking a look at your improvements. Please send me the instructions for the modified stored procedure.

    Regards,

    Aditya Moitra

  • aditya.anita.moitra (10/12/2012)


    Jason,

    I am in the same situation to implement Data Driven Subscription to a File Share while we are using SQL Server 2008 R2 Standard Edition. I'm really interested in taking a look at your improvements. Please send me the instructions for the modified stored procedure.

    Regards,

    Aditya Moitra

    The newest version is available here ---> http://www.sqlservercentral.com/articles/2824/

    The "file share" naming method is described here ---> http://www.sqlservercentral.com/articles/Reporting+Services+(SSRS)/69546/

    Hope this helps.

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • Very nice article. I have also had a similar request for our user community. The biggest issue we face is the implementation of a user interface that is simplistic enough for the uers of our reports. We have around 20 varied reports and each have up to eight optional parameters to choose from.

    One thing I have noticed is that if you have an error on the parameters its not fun to try and clear it up so the subscription will run again. I can run, as a test, a single subscription a dozen times without changing the parameters and can count on it failing at least 20% of the time due to a parameter issue. It's extremely frustrating.

    If you post any further tweaks to the code I would love to see them.

    Once again this is the best article I have found on this particular subject.

  • Jason Selburg (5/16/2011)


    This is the most recent code I have. It may need some tweaking for 2008, I've not tested it on '08.

    http://www.sqlservercentral.com/articles/Development/2824/[/url]

    Hi Jason

    I'm trying out your code using the script below to loop through the emails that need to go out, but I keep getting a syntax error at @EmailTo

    What have I messed up this time?

    declare @ReportParameter varchar(50)

    declare @email_address varchar(255)

    declare cur_cursor cursor for (select staffuserid,TestMail

    from [myserver].[mydatabase].[dbo].[v_LddDailyMissingRegs])

    open cur_cursor

    Fetch Next from cur_cursor into @ReportParameter, @email_address

    While @@fetch_status = 0

    begin

    exec data_driven_subscription

    @scheduleName = 'DailyMissingRegs'

    @emailTO = @email_address

    @emailCC = ''

    @emailBCC = ''

    @emailReplyTO = 'test@test.ac.uk'

    @emailBODY = 'test'

    @parameterName = staffid

    @parameterValue = @ReportParameter

    @sub = 'test'

    @renderFormat = 'MHTML'

    @exitCode = -1

    @exitMessage = 'The text description of the failure or success of the procedure.'

    Fetch Next from cur_cursor into @ReportParameter, @email_address

    end

    close cur_cursor

    deallocate cur_cursor

  • ldanks (4/8/2014)


    Jason Selburg (5/16/2011)


    This is the most recent code I have. It may need some tweaking for 2008, I've not tested it on '08.

    http://www.sqlservercentral.com/articles/Development/2824/[/url]

    Hi Jason

    I'm trying out your code using the script below to loop through the emails that need to go out, but I keep getting a syntax error at @EmailTo

    What have I messed up this time?

    declare @ReportParameter varchar(50)

    declare @email_address varchar(255)

    declare cur_cursor cursor for (select staffuserid,TestMail

    from [myserver].[mydatabase].[dbo].[v_LddDailyMissingRegs])

    open cur_cursor

    Fetch Next from cur_cursor into @ReportParameter, @email_address

    While @@fetch_status = 0

    begin

    exec data_driven_subscription

    @scheduleName = 'DailyMissingRegs'

    @emailTO = @email_address

    @emailCC = ''

    @emailBCC = ''

    @emailReplyTO = 'test@test.ac.uk'

    @emailBODY = 'test'

    @parameterName = staffid

    @parameterValue = @ReportParameter

    @sub = 'test'

    @renderFormat = 'MHTML'

    @exitCode = -1

    @exitMessage = 'The text description of the failure or success of the procedure.'

    Fetch Next from cur_cursor into @ReportParameter, @email_address

    end

    close cur_cursor

    deallocate cur_cursor

    You need commas between your parameters. :w00t:

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • ...and depending on whether staffid is supposed to be a literal or a variable, it either needs single quotes around it or to be preceded by @.

  • Jason Selburg (4/8/2014)


    ldanks (4/8/2014)


    Jason Selburg (5/16/2011)


    This is the most recent code I have. It may need some tweaking for 2008, I've not tested it on '08.

    http://www.sqlservercentral.com/articles/Development/2824/[/url]

    Hi Jason

    I'm trying out your code using the script below to loop through the emails that need to go out, but I keep getting a syntax error at @EmailTo

    What have I messed up this time?

    You need commas between your parameters. :w00t:

    Oh for pity's sake, how embarrassing is that!

    I'll get my coat.

    Still, surely not a bad thing to occasionally get simple 'problems' lol

    Cheers 🙂

  • ldanks (4/8/2014)


    Jason Selburg (4/8/2014)


    ldanks (4/8/2014)


    Jason Selburg (5/16/2011)


    This is the most recent code I have. It may need some tweaking for 2008, I've not tested it on '08.

    http://www.sqlservercentral.com/articles/Development/2824/[/url]

    Hi Jason

    I'm trying out your code using the script below to loop through the emails that need to go out, but I keep getting a syntax error at @EmailTo

    What have I messed up this time?

    You need commas between your parameters. :w00t:

    Oh for pity's sake, how embarrassing is that!

    I'll get my coat.

    Still, surely not a bad thing to occasionally get simple 'problems' lol

    Cheers 🙂

    No worries, we've all surely made the same mistake. Although we didn't post it in a forum for the world to see.... *chuckles*

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg

Viewing 15 posts - 31 through 45 (of 47 total)

You must be logged in to reply to this topic. Login to reply