Today, I was faced with a really weird issue with a Report developed for CRM Online. The Report worked fine both at BIDS and my test On-Premise instance, but once I’ve tried to upload it to the productive instance I got following error:
I’ve downloaded the description file, but the error log didn’t contain any helpful information:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=126.96.36.199, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An error occurred while trying to add the report to Microsoft Dynamics CRM. Try adding the report again. If this problem persists, contact your system administrator.Detail: <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts"> <ErrorCode>-2147188072</ErrorCode> <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" /> <Message>An error occurred while trying to add the report to Microsoft Dynamics CRM. Try adding the report again. If this problem persists, contact your system administrator.</Message> <Timestamp>2014-01-19T20:15:50.4036673Z</Timestamp> <InnerFault i:nil="true" /> <TraceText i:nil="true" /> </OrganizationServiceFault>
After that, I opened the SDK for CRM and found this article that describes the limitations of reports in CRM Online. I went through all used formulas and replaced the parts that used Equals and Decimal.Zero.
So my suggestion if you have problems uploading Report to CRM Online:
1. Recheck that your report uses Fetch Xml DataSource.
2. Recheck all formulas that you have in your report and remove (or replace) all denied types and denied members.
3. Ensure that your report doesn’t use references to any assemblies.