Wednesday, March 7, 2012

MS CRM Reports - Email Subscription and Scheduling


Once you are done with creating a report in ms crm, the next probable step is to subscribe the report inorder to automatically send the report to a particular emailaddress at particular intervals. We use the Report Manager Subscriptions for this automation purpose.

Inorder to create a subscription, follow the below steps:
1. Open the Report Manager from the browser using the below url - 
    http://reportingserver/reports
    here, ReportingServerName should be replaced by the name of your server on which  
    SSRS is installed and which is pointed by MS CRM during the installation process.
2. Open the folder where the name of the folder is same as your CRM Organization name
3. Open your specific report. If it is insisting for credentials then you need to update the 
    DataSource in the Properties tab to automatically supply the credentials.
4.In the Properties tab, under General, give appropriate name to the report which can be 
   displayed when this report has been sent as an attachment from the subscription process. 
   By default, this is having a GUID value.
5. Go to Data Sources. Best practice is to point to a Shared data source with the following 
    properties.
    Connection type: Microsoft SQL Server
    Connection string: Data Source=SQLServerName; Initial Catalog=DatabaseName
    Connect using:
      Credentials stored securely in the report server
      Provide the windows credentials that are having necessary privileges to run the report
      Check the Use as Windows credentials when connecting to the data source.
6. Apply it
7. Go to Subscriptions and click on New Subscription. Provide the necessary fields like To, 
    Reply-To, Subject..
8. Check Include Report and Select required Render Format
9. Select Schedule and click Ok

You can test the subscription by scheduling this for "Once" in Select Scehdule and verify if the report is getting delivered in the way it is required.
If you come across any error during the delivery, most of the times it happens with the credentials. The credentials you supplied do not have enough privileges to run the report. so, try with admin credentials to confirm this and provide the credentials with updated privileges.

No comments:

Post a Comment