Monday, February 20, 2012

Programatically Email a report

Does anyone have any code to run a report and email it. I want to run the
report that has one parameter and then email it. With the report as the Body
of the email and then the same report as an attachment in pdf format. I would
like to also add some text to the email in front of the report. Or could you
point me to a sample or book that would help. Which report interface would I
use?
--
Thanks,
Jon AYou could use subscriptions - see "E-Mail Delivery in Reporting Services" in
reporting Services Books On Line.
If you want more control over the email you could create the pdf file
programatically either using URL access (again in BOL) or the Web Services,
then write a bit of code to send email - that will depend on what your email
system is.
"Jon A" wrote:
> Does anyone have any code to run a report and email it. I want to run the
> report that has one parameter and then email it. With the report as the Body
> of the email and then the same report as an attachment in pdf format. I would
> like to also add some text to the email in front of the report. Or could you
> point me to a sample or book that would help. Which report interface would I
> use?
> --
> Thanks,
> Jon A|||Which is more efficient Web services or url access. I tried using
subscriptions but I can't figure out how to get the report in the body of the
message. Also my mail server needs you to logon. Where do I put the user name
and password for the mail server to get or does subsciptions use an outlook
profile?
--
Thanks,
Jon A
"Mary Bray [SQL Server MVP]" wrote:
> You could use subscriptions - see "E-Mail Delivery in Reporting Services" in
> reporting Services Books On Line.
> If you want more control over the email you could create the pdf file
> programatically either using URL access (again in BOL) or the Web Services,
> then write a bit of code to send email - that will depend on what your email
> system is.
>
> "Jon A" wrote:
> > Does anyone have any code to run a report and email it. I want to run the
> > report that has one parameter and then email it. With the report as the Body
> > of the email and then the same report as an attachment in pdf format. I would
> > like to also add some text to the email in front of the report. Or could you
> > point me to a sample or book that would help. Which report interface would I
> > use?
> > --
> > Thanks,
> > Jon A

No comments:

Post a Comment