Posts Tagged ‘reports’

ReportProcessingException: Cannot create a connection to data source ‘CRM’

March 16, 2013 1 comment

Recently, when we deployed our CRM managed solution with reports on our testing environment, we were getting “rsProcessingAborted” error while accessing the  reports.

When we check the event viewer for more error details, we found below “Caller has insufficient privilege to run report” exception

Data source ‘CRM’: An error has occurred. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:

Cannot create a connection to data source ‘CRM’. —> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: Caller has insufficient privilege to run report as user


  • In our scenario, SQL Server report service was running under a separate “Service Account”
SSRS Report Service Account

SSRS Report Service Account

  • The service account under which report service was running does not have required privileges to establish connection and access filtered views

Below fix worked for us


  • Since the Report Service’s “service account” was unable to access CRM filtered views,
    • We added the “service account” as a member of the AD’s “PrivReportingGroup {Org_guid}” and “PrivUserGroup {Org_guid}” groups
    • Provided “service account” SQL Server login with permissions to ReportServer and ReportServerTempDB (db_owner, RSExecRole)

Getting logged in user’s GUID in CRM reports

We can get the logged in user GUID in the custom reports deployed in CRM using “fn_FindUserGuid()”  function

Below is the sample query for the same


SELECT @currUserId=dbo.fn_FindUserGuid()

PRINT @currUserId


Report cannot be displayed – rsProcessingAborted


This is the most common error we get when you run a custom report from CRM.

Report error - rsProcessingAborted

Report error – rsProcessingAborted

Though there could be many reasons below are the ways to know the reason for issue

To debug:-

  • Connect to the machine where your SSRS server installed and open the event viewer
    • Run –> eventvwr –> Windows –> Application
Report error - Event Viewer

Report error – Event Viewer

  • For detailed error description, open the SQL Reporting logs from below path
    • C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\LogFiles