A FetchXML report does not get uploaded in the CRM when developed using Visual Studio 2015 and the latest SSDT (17.1 version). While uploading, it gives the below error message:

Microsoft Dynamics 365 CRM Online Report Upload Issue with Visual Studio 2015

 

Even the download log file doesn’t give any useful information to diagnose the issue.

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An error occurred while trying to add the report to Microsoft Dynamics 365. Try adding the report again. If this problem persists, contact your system administrator.

Actually, the issue is due to the latest version of SSDT (17.1). This is a known issue and which will be fixed in the later release (17.2). Kindly refer to the below blog regarding this: VS2015 Produces Invalid Report Definition Targeting SSRS 2012.

A simple custom FetchXML report, or the report generated from the CRM report wizard, will not get uploaded in the CRM when it’s developed with Visual Studio 2015. Once the report is developed using the VS 2015 with latest SSDT, the report definition version will be 2016 and which is not supported by the CRM and will not recognise below highlighted XML tags.

Solution

  1. Right click on the reporting project and select the properties option.
  2. Then select the Target Server Version to “SQL Server 2008 R2, 2012 or 2014

  1. Rebuild the project and upload the report RDL file exist inside the bin folder and then the report will be uploaded successfully. 🙂