Hi all,
How do I programmatically add email recipients to a report?
Regards
John.You can use the CreateSubscription method of the the ReportingService
object. BOL has a good code sample of how to do this.
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"John" <a@.b.c> wrote in message
news:Oj1ZPaHWFHA.2572@.TK2MSFTNGP14.phx.gbl...
> Hi all,
> How do I programmatically add email recipients to a report?
> Regards
> John.
>|||We actually has a similar issue and we used the CreateSubscription method of
the ReportingService object. However, because we use Windows authentication
for our internal web app, apparently we need to grant Manage All
Subscriptions right to all users in order to send e-mail to other accounts.
We ended up getting the file stream from the web app using URL access and
send the file through our app through SMTP. We really would like to use the
built-in features in rs if there is some workaround. We were thinking of
impersonating another person before calling the method but we'll need to
manage the credential of that account.
"Jasper Smith" wrote:
> You can use the CreateSubscription method of the the ReportingService
> object. BOL has a good code sample of how to do this.
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "John" <a@.b.c> wrote in message
> news:Oj1ZPaHWFHA.2572@.TK2MSFTNGP14.phx.gbl...
> > Hi all,
> >
> > How do I programmatically add email recipients to a report?
> >
> > Regards
> > John.
> >
>
>|||#1
Make sure you are using stored credentials on the data source the report
uses. This is required for subscription processing.
#2
Create a ScheduleDefinition. Check BOL and MSDN for info on creating
extension settings in code for email delivery.
Good reference (even though the subscription is file share and not email):
http://www.odetocode.com/Articles/114.aspx
#3
Check the email configuration options in the RSReportServer.config file.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsadmin/htm/arp_configserver_v1_4bzl.asp
#4
Make sure the server running SMTP has the SMTP service set up correctly.
--
Adrian M.
MCP
"John" <a@.b.c> wrote in message
news:Oj1ZPaHWFHA.2572@.TK2MSFTNGP14.phx.gbl...
> Hi all,
> How do I programmatically add email recipients to a report?
> Regards
> John.
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment