October 19, 2016 at 2:57 pm
On a ssrs 2012 report server, I want to setup a data driven subscription where the results are emailed to various users. I would like to send the email messages to the various users by running a t-sql 2012 script and not actually generating an ssrs 2012 report. The email message will either contian the information that is incorrect and/or an attached excel spreadsheet will display the information that is not correct. The email messages will be sent to each person that is associated with the unique school.
Is this possible? If so, would you show me how to setup the data driven email messages by using t-sql 2012 only with code and/or links to refer to?
If this is not possible, would you tell me how to setup the ssrs 2012 report where a datadriven subscription is used and the report is emailed to the applicable user?
October 20, 2016 at 12:13 pm
Wendy,
You could do create a job to run a stored procedure on a schedule to do this.
If you wanted to just send messages, you could do something like:
1. open a cursor of all the recipients,
2. generate the text file inside the loop.
3. email using sp_Send_DB_Mail stored procedure
4. (log).
and then loop...
If you're not sending an SSRS report, you don't need SSRS to be involved at all. Just create a job and a schedule to call the stored procedure you write.
You should check out this documentation on sp_send_dbmail
October 21, 2016 at 8:05 am
Thanks!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply