The Fetch XML report will 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.
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=220.127.116.11, 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,
A simple custom Fetch XML 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 recognize the below highlighted XML tags.
<?xml version=”1.0″ encoding=”utf-8″?><Report xmlns:rd=”http://schemas.microsoft.com/SQLServer/reporting/reportdesigner” xmlns=”http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition” xmlns:df=”http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition/defaultfontfamily”
- Right-click on the reporting project and select the properties option.
- Then select the Target Server Version to “SQL Server 2008 R2, 2012 or 2014”
- Rebuild the project and upload the report RDL file exist inside the bin folder and then the report will be uploaded successfully.