Hello,
I have created a report project in visual studio 2019 and the report works in preview.
This is the first line in xml:
<?xml version="1.0" encoding="utf-8"?>
However, below error is thrown when trying to upload the rdl file in dynamics 365 (on premise)
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlReader.MoveToContent()
at System.Xml.XmlReader.IsStartElement()
at Microsoft.Crm.ObjectModel.ReportDependencyCalculator.RetrieveAndSetDependenciesForFetchXml(String xmlString, DependencyTypes type, SetAncestorHandler ancestorHandler, CreateInvalidAncestorDependencyHandler invalidDependencyHandler, ExecutionContext context)
at Microsoft.Crm.ObjectModel.ReportDependencyCalculator.SetReportAttributeDependencies(BusinessEntity entity, DependencyTypes type, ExecutionContext context)
at Microsoft.Crm.ObjectModel.ReportDependencyCalculator.DetermineRequiredDependencies(ExecutionContext context)
at Microsoft.Crm.ObjectModel.DependencyCalculatorBase.DetermineAllDependencies(ICollection`1 records, ExecutionContext context)
at Microsoft.Crm.ObjectModel.DependencyHelperBase.CreateDependencies(ExecutionContext context)
at Microsoft.Crm.Dependency.ComponentCollector.CreateComponentDependencies(Dictionary`2 recordsByComponentType, ExecutionContext context)
at Microsoft.Crm.Dependency.ComponentCollector.ProcessRecords(ExecutionContext context)
at Microsoft.Crm.BusinessEntities.ExecutionContext.ProcessDependencies(FlushCacheOption option, CreateNewCollectorOption createOption)
at Microsoft.Crm.BusinessEntities.ExecutionContext.CommitTransaction(ProcessDependenciesOption option, FlushCacheOption flushOption)
at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, Guid callerRegardingObjectId, Int32 invocationSource, Version endpointVersion, OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.DispatchRequest(OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest, SdkResponseDescription responseDescription, SdkPerformanceCounterContext sdkPerformanceCounterContext)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequestRequestWithInstrumentation(OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.<>c__DisplayClass17_0.<ExecuteRequest>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, Guid targetCallerRegardingObjectId, UserType targetUserType, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequestInternal(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #8316C20CDetail:
<OrganizationServiceFault xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">schemas.microsoft.com/.../Contracts">
<ActivityId>36952a95-f3ad-4838-8148-5e75398f3e73</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="">schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>ApiExceptionSourceKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">Api/PostPipeline</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiOriginalExceptionKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlReader.MoveToContent()
at System.Xml.XmlReader.IsStartElement()
at Microsoft.Crm.ObjectModel.ReportDependencyCalculator.RetrieveAndSetDependenciesForFetchXml(String xmlString, DependencyTypes type, SetAncestorHandler ancestorHandler, CreateInvalidAncestorDependencyHandler invalidDependencyHandler, ExecutionContext context)
at Microsoft.Crm.ObjectModel.ReportDependencyCalculator.SetReportAttributeDependencies(BusinessEntity entity, DependencyTypes type, ExecutionContext context)
at Microsoft.Crm.ObjectModel.ReportDependencyCalculator.DetermineRequiredDependencies(ExecutionContext context)
at Microsoft.Crm.ObjectModel.DependencyCalculatorBase.DetermineAllDependencies(ICollection`1 records, ExecutionContext context)
at Microsoft.Crm.ObjectModel.DependencyHelperBase.CreateDependencies(ExecutionContext context)
at Microsoft.Crm.Dependency.ComponentCollector.CreateComponentDependencies(Dictionary`2 recordsByComponentType, ExecutionContext context)
at Microsoft.Crm.Dependency.ComponentCollector.ProcessRecords(ExecutionContext context)
at Microsoft.Crm.BusinessEntities.ExecutionContext.ProcessDependencies(FlushCacheOption option, CreateNewCollectorOption createOption)
at Microsoft.Crm.BusinessEntities.ExecutionContext.CommitTransaction(ProcessDependenciesOption option, FlushCacheOption flushOption)
at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, Guid callerRegardingObjectId, Int32 invocationSource, Version endpointVersion, OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.DispatchRequest(OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest, SdkResponseDescription responseDescription, SdkPerformanceCounterContext sdkPerformanceCounterContext)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequestRequestWithInstrumentation(OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.<>c__DisplayClass17_0.<ExecuteRequest>b__0()</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiStepKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">00000000-0000-0000-0000-000000000000</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiDepthKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">1</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiActivityIdKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">36952a95-f3ad-4838-8148-5e75398f3e73</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiPluginSolutionNameKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">System</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiStepSolutionNameKey</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">System</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlReader.MoveToContent()
at System.Xml.XmlReader.IsStartElement()
at Microsoft.Crm.ObjectModel.ReportDependencyCalculator.RetrieveAndSetDependenciesForFetchXml(String xmlString, DependencyTypes type, SetAncestorHandler ancestorHandler, CreateInvalidAncestorDependencyHandler invalidDependencyHandler, ExecutionContext context)
at Microsoft.Crm.ObjectModel.ReportDependencyCalculator.SetReportAttributeDependencies(BusinessEntity entity, DependencyTypes type, ExecutionContext context)
at Microsoft.Crm.ObjectModel.ReportDependencyCalculator.DetermineRequiredDependencies(ExecutionContext context)
at Microsoft.Crm.ObjectModel.DependencyCalculatorBase.DetermineAllDependencies(ICollection`1 records, ExecutionContext context)
at Microsoft.Crm.ObjectModel.DependencyHelperBase.CreateDependencies(ExecutionContext context)
at Microsoft.Crm.Dependency.ComponentCollector.CreateComponentDependencies(Dictionary`2 recordsByComponentType, ExecutionContext context)
at Microsoft.Crm.Dependency.ComponentCollector.ProcessRecords(ExecutionContext context)
at Microsoft.Crm.BusinessEntities.ExecutionContext.ProcessDependencies(FlushCacheOption option, CreateNewCollectorOption createOption)
at Microsoft.Crm.BusinessEntities.ExecutionContext.CommitTransaction(ProcessDependenciesOption option, FlushCacheOption flushOption)
at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, Guid callerRegardingObjectId, Int32 invocationSource, Version endpointVersion, OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.DispatchRequest(OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest, SdkResponseDescription responseDescription, SdkPerformanceCounterContext sdkPerformanceCounterContext)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequestRequestWithInstrumentation(OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.<>c__DisplayClass17_0.<ExecuteRequest>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, Guid targetCallerRegardingObjectId, UserType targetUserType, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequestInternal(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #8316C20C</Message>
<Timestamp>2021-05-11T05:22:31.278264Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
1. I have confirmed the encoding is utf-8 and doesnt contain BOM.
2. I have uploaded the rdl file from bin/debug folder
3. project uses sql server 2016 or later as target version.
Any help appreciated! Thanks in advance
Hi,
Since you are sure that there is no BOM, have you check the version of Microsoft Dynamics 365 Report Authoring Extension?
It is published in 3/4/2021 and before that VS2015 is the last version that is capable of running the Report Authoring Extension to use FetchXML.
If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.
Best Regards,
Nya
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,524 Super User 2024 Season 2
Martin Dráb 228,493 Most Valuable Professional
nmaenpaa 101,148