Reporting Services Subscription problem

  • Hi,

    I have created one subscription for a report and For Each user i am updating parameters of the report and manually trigger that subscription via T- SQL. After triggering event system must send email with PDF attachement to the users.I have put delay of 35 seconds in between report. But sometime SSRS Sends duplicate emails and some times it skips one of the report from the queue.

  • Lacking your query you're using to trigger those subscriptions, and probably a whole host of other information, there is really no analysis to be done.

    However, this scenario sound like a great candidate for a "data-driven subscription".

    Google that and you should find some useful information on a better way to handle this.

  • Thanks for the help,

    Senario 1 : I am sending different clients same report with different data. For Example Client 1 wants reports for xyz region and Client 2 requires for other region.

    I have created subscription for report once and then pick subscription Id and ScheduleId from Report server table to manually trigger

    I am retrieving all setups from database for clients defined email address and regions. Looping through cursor I am processing those details and updating Email Address and Report Parameters in the [ReportServer].[dbo].[Susbcriptions]

    Then using below SQL send PDF to the clients.

    exec ReportServer.dbo.AddEvent @EventType='SharedSchedule', @EventData=@ScheduleID

    WaitFor Delay 00:00:45 - To allow report processiong to be finished.

    Problem1: When Looping through cursor - sometimes client 2 never gets report.

    Senario2: For Example, I want to send different license details License 1, License 2 and License 3 to the one client.

    Using above method sometimes clients gets License 1 details report 2 times and then License2 details report skipped.

    Hope this will provide more information. I am using SQL SERver 2008 Reporting services.

  • Does this help? I sounds like you are already doing something similar. I have had reports of needing to wait for a timeout. Now that I think of it, maybe transactions would help.

    http://www.sqlservercentral.com/articles/Development/2824/

    ______________________________________________________________________

    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
  • Thanks,

    I have implemented this code. and will observe few days.

  • I have different types of reports that sends out to the client. I have created different stored procedure for different types of reports and every procedure runs as SQL Job in every 15 minutes. During that 15 minutes if report has been schedule then I am updating report parameter using below code and sends out to the client.

    UPDATE [ReportServer].[dbo].[Subscriptions]

    SET [Parameters] = ''

    ,ExtensionSettings=''

    WHERE subscriptionId=@SubscriptionId

    UPDATE [ReportServer].[dbo].[Subscriptions]

    SET [Parameters] = @ParameterString

    ,ExtensionSettings=@ExtensionSetting

    WHERE subscriptionId=@SubscriptionId

    EXEC msdb..sp_start_job @job_name = @ScheduleID

    WAITFOR DELAY '00:01:30'

    In my case two stored procedures are executing concurrently and try to execute above code for different subscriptionId and ScheduleId.

    Randomly reports are not sent out to the client and I have checked ExecutionLog2 it is also missing entry.

  • If you are using the Enterprise Edition you should consider a Data Driven Subscription.

  • Daniel Bowlin (6/3/2014)


    If you are using the Enterprise Edition you should consider a Data Driven Subscription.

    +2

    Also make sure that your email server is not a constraint.

    We one had a similar issue, and it was email server refusing concurrent connections.

    SSRS log file would give some clues to this.

Viewing 8 posts - 1 through 7 (of 7 total)

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