none
Email subscription in RS

    Question

  •  

    Hi all,

     

    I need to do some kind of data driven subscription that will send out emails to people via reporting services. Can anybody inform me how I can go about this AND the limitations of what I can and cant do with this?

     

    Thanks

     

    Mili

    Friday, November 14, 2008 10:38 AM

Answers

  • Something like (?):

     

    • Natively only be implemented in Reporting Services within the Enterprise Edition
    • Make sure you have the appropiate licenses for delivering
    • You will need to have a SMTP relay for sending the messages
    • If you want to backlink the reports to the actual data, the users will need to have access to the report server
    • Reporting Services account will need to have send permissions on the used SMTP server

    Jens K. Suessmeyer

    Friday, November 14, 2008 11:13 AM

All replies

  • Something like (?):

     

    • Natively only be implemented in Reporting Services within the Enterprise Edition
    • Make sure you have the appropiate licenses for delivering
    • You will need to have a SMTP relay for sending the messages
    • If you want to backlink the reports to the actual data, the users will need to have access to the report server
    • Reporting Services account will need to have send permissions on the used SMTP server

    Jens K. Suessmeyer

    Friday, November 14, 2008 11:13 AM
  • Thanks Jens,

     

    is there any example of using email subscription?

    Friday, November 14, 2008 11:26 AM
  • What about:

     

    http://msdn.microsoft.com/en-us/library/ms169673.aspx

     

    Jens K. Suessmeyer

    Friday, November 14, 2008 11:48 AM
  • few days back I created a doc for creating different subscription and scheduled reports to user from our webapplication .

    step by step info is given on below link.

    http://msdn.microsoft.com/en-us/library/ms157386.aspx

     

    first setup a SMTP server email account.

    goto-start-programfiles-sql server->configuration tools-->reporting service configuration.

    Now put the Sender email address and IP of localsmtp server (microsoft exchanger server)

    then if your are using report manager then its piece of cake. "http://localhost/reportmanager"

    now I created a table like below in database to use the report server email configuration.

    create a datadriven subscription of email type...

     

     

    Create table ReportDelivery

    (

    AccountID int,--Account to which the report will be deliverd

    AccountEmail nvarchar(200),--Account Email Id to which the report will be sent

    FILENAME nvarchar(200), --Report Name

    PATH  nvarchar(200),--Path in UNC format (//rootcomputer/folder) at which reports will be delivered

    RENDER_FORMAT nvarchar(200), --report can be saved in PDF,CSV,XLS etc

    WRITEMODE nvarchar(200), --if we want to keep the old copies or overwrite the reports

    FILEEXTN nvarchar(200), --include file extension in file name

    USERNAME nvarchar(200), --user name require to access the network folder

    PASSWORD nvarchar(200), --password required to access the folder

    paramterString nvarchar(2000) --parameters required for the report may be a comma seperated value string

    )

    for each report type paste the following the query window.

    select * from ReportDelivery where accountId = 35 and FILENAME='DailyDriverActivity'

    ________________________________
    creating report subscription thrught code...using reporting web service API

     

    ReportingService rs;

     

    Creating a Subscription to a given Email ID through .Net Code.

    //connecting to server

    try

    {

    //now calling the report with given parameters parameter

    localhost.ReportingService rs = new localhost.ReportingService();

    localhost.ExtensionSettings extset = new localhost.ExtensionSettings();

    extset.Extension = "Report Server Email";

    //Create Parameter Values array

    localhost.ParameterValueOrFieldReference[] ParamVals = new localhost.ParameterValueOrFieldReference[5];

    extset.ParameterValues = ParamVals;

    //-- Populate the Extension Parameters

    localhost.ParameterValue pvTo = new localhost.ParameterValue();

    pvTo.Name = "TO";

    pvTo.Value = "abhishek.sharma@asdf.com";

    extset.ParameterValues[0] = pvTo;

    localhost.ParameterValue pvIncludeRpt = new localhost.ParameterValue();

    pvIncludeRpt.Name = "IncludeReport";

    pvIncludeRpt.Value = "true";

    extset.ParameterValues[1] = pvIncludeRpt;

    localhost.ParameterValue pvRenderFormat = new localhost.ParameterValue();

    pvRenderFormat.Name = "RenderFormat";

    pvRenderFormat.Value = "PDF";

    extset.ParameterValues[2] = pvRenderFormat;

    localhost.ParameterValue pvPriority = new localhost.ParameterValue();

    pvPriority.Name = "Priority";

    pvPriority.Value = "NORMAL";

    extset.ParameterValues[3] = pvPriority;

    localhost.ParameterValue pvSubject = new localhost.ParameterValue();

    pvSubject.Name = "Subject";

    pvSubject.Value = "Subscribed Speed report.";

    extset.ParameterValues[4] = pvSubject;

    //-- Create the Subscription (no report parameters in last arg)

    rs.CreateSubscription("SPEEDScheduled", extset, "Subscribed Speed report.", "TimedSubscription", "69be8bf1-70aa-4240-9721-be735854fe6f", null);

    //Parameters are REPORT NAME, REPORT EXTN INFO, EVENTTYPE, MATCHDATA, //PARAMETERS

     

    }

    catch(Exception eEx)

    {

     

    }

     

     

    Friday, November 14, 2008 11:58 AM