Data-Driven Subscriptions

  • I have a report in SSRS that is based on a stored procedure that will return data for specific people. This report will create a 1 page letter/report for each person that is returned from my Stored Procedure (Persons name, email, company ID, item name, item amount). Typically we run this report and just export it to PDF and print it off and then hand each person a paper copy...due to working remotely, we would like to be able to run this report and have each "letter/page" be emailed to each person - wanting each person to only receive their 1 page rather than all the pages that get returned in the report.

    What is the trick to make this happen?

    In my DDS query, I EXEC the same stored procedure I used in my report, but I'm guessing I can't do that???

    What ended up happening is that people got multiple emails to their same email account that included the PDF document with everyone's letter rather than just their letter. Some people got two emails and others got eleven emails?

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • I believe you need to restructure the report to produce the single page for a person - and include a parameter to identify that person.  Once you have that report - then you can create a data-driven subscription that populates the To: address and parameter from the query.

    The data-driven subscription would have a single row per person...which will tell SSRS to execute the report and email for each individual specified.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • I have this working now, but need to figure out how to find records that fail - say an email address we have on file has been mis-typed or is not longer active - how do you tell what email failed I will see 118 of 120 processed successfully. What 2 didn't process?

  • You will have to look into the SSRS log files to see if there is any information about those failures.

    https://docs.microsoft.com/en-us/sql/reporting-services/report-server/report-server-service-trace-log?view=sql-server-ver15

     

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

Viewing 5 posts - 1 through 4 (of 4 total)

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