Kopīgot, izmantojot


Reporting Error occurs after uploading a custom SQL based report in Microsoft Dynamics CRM

This article provides a resolution for the issue that you may receive The report cannot be displayed. (rsProcessingAborted) error when trying to run an uploaded custom SQL based report in Microsoft Dynamics CRM.

Applies to:   Microsoft Dynamics CRM 2011
Original KB number:   2891221

Symptoms

After uploading a custom SQL based report in Microsoft Dynamics CRM, users see the following error when trying to run the report:

Reporting Error
The report cannot be displayed. (rsProcessingAborted)

If you review the SSRS report logs, you can see the following error:

processing!ReportServer_0-4!ef0!09/09/2013-13:21:40:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'CRM'. ---> System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.ReportingServices.DataExtensions.ConnectionExtension.Open()
at Microsoft.ReportingServices.DataExtensions.SqlConnectionWrapperBase.Open()
at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.OpenDataSourceExtensionConnection(IProcessingDataSource dataSourceObj, String connectString, DataSourceInfo dataSourceInfo, String datasetName)
--- End of inner exception stack trace ---;

Additional errors you may not be exactly the same but similar to those above. The key data to look for is in the stack trace for the following items:

Stack contains:
at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.OpenDataSourceExtensionConnection

Error contains:
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'CRM'. ---> System.Data.SqlClient.SqlException:

Note

SSRS default log location is DRIVE:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\LogFiles.

Cause

The problem is related to a bad data source for the report file within SSRS. If the Microsoft Dynamics CRM organization database is not structured such as ORG_MSCRM, then when creating the report in Microsoft Dynamics CRM, it will keep the Data Source within the RDL file instead of using the Data Source Types associated with the Microsoft Dynamics CRM Reporting Extensions/Data Connector. The problem is that the Initial Catalog within the RDL file must contain _MSCRM.

Screenshot shows Initial Catalog does not end with _MSCRM.

Note

Initial catalog does not end with _MSCRM.

Resolution

Before uploading the SQL based report in Microsoft Dynamics CRM, append _MSCRM to the Initial Catalog.

Screenshot shows Fixed report with _MSCRM is at the end of Initial Catalog.

Important

The initial catalog must end with _MSCRM for this to work properly.