Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Fetch report won't import

Posted on by

Sorry if this has already been covered but the search on this thing is terrible.

Using Visual Studio 2015 Professional to write a report for Dynamics 365 Online. The report generates fine but will not import into Dynamics. I simply get errors.

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Only data source using fetch data provider is permitted on this report.Detail: 
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
  <ActivityId>85099a00-1009-4efb-aca3-9aa9d6608679</ActivityId>
  <ErrorCode>-2147187955</ErrorCode>
  <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
  <Message>Only data source using fetch data provider is permitted on this report.</Message>
  <Timestamp>2017-07-18T13:45:05.0028937Z</Timestamp>
  <ExceptionRetriable>false</ExceptionRetriable>
  <ExceptionSource i:nil="true" />
  <InnerFault i:nil="true" />
  <OriginalException i:nil="true" />
  <TraceText i:nil="true" />
</OrganizationServiceFault>

I have tried changing the "TargetServerVersion" but this made no difference. The error is, 20170718_5F00_error_5F00_about_5F00_import_5F00_report.PNG

I cannot see, for the life of me what I am doing wrong. I have attached the header section of the report to see if anyone can shed some light on this please?

<?xml version="1.0" encoding="utf-8"?>
<Report MustUnderstand="df" xmlns="schemas.microsoft.com/.../reportdefinition" xmlns:rd="schemas.microsoft.com/.../reportdesigner" xmlns:df="schemas.microsoft.com/.../defaultfontfamily">
  <df:DefaultFontFamily>Segoe UI</df:DefaultFontFamily>
  <AutoRefresh>0</AutoRefresh>
  <DataSources>
    <DataSource Name="DataSource1">
      <DataSourceReference>DataSource1</DataSourceReference>
      <rd:SecurityType>None</rd:SecurityType>
      <rd:DataSourceID>b7d32851-327f-4c93-b4c8-e1159a63f957</rd:DataSourceID>
    </DataSource>
  </DataSources>
  <DataSets>
    <DataSet Name="DataSet1">
      <Query>
        <DataSourceName>DataSource1</DataSourceName>
        <QueryParameters>
          <QueryParameter Name="days">
            <Value>=Parameters!days.Value</Value>
            <rd:UserDefined>true</rd:UserDefined>
          </QueryParameter>
        </QueryParameters>
        <CommandText>&lt;fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true"&gt;
  &lt;entity name="lead"&gt;
    &lt;attribute name="fullname" /&gt;
    &lt;attribute name="companyname" /&gt;
    &lt;attribute name="telephone1" /&gt;
    &lt;attribute name="leadid" /&gt;
    &lt;order attribute="fullname" descending="false" /&gt;
    &lt;filter type="and"&gt;
      &lt;condition attribute="createdon" operator="olderthan-x-days" value="7" /&gt;
      &lt;condition attribute="uob_enquirystatus" operator="in"&gt;
        &lt;value&gt;183400000&lt;/value&gt;
        &lt;value&gt;183400001&lt;/value&gt;
        &lt;value&gt;183400007&lt;/value&gt;
        &lt;value&gt;183400004&lt;/value&gt;
        &lt;value&gt;183400003&lt;/value&gt;
      &lt;/condition&gt;
    &lt;/filter&gt;
    &lt;link-entity name="activitypointer" from="regardingobjectid" to="leadid" alias="ag"&gt;
      &lt;filter type="and"&gt;
        &lt;condition attribute="createdon" operator="olderthan-x-days" value="14" /&gt;
      &lt;/filter&gt;
    &lt;/link-entity&gt;
  &lt;/entity&gt;
&lt;/fetch&gt;</CommandText>
        <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
      </Query>
      <Fields>
        <Field Name="fullname">
          <DataField>fullname</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
        <Field Name="companyname">
          <DataField>companyname</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
        <Field Name="telephone1">
          <DataField>telephone1</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
        <Field Name="leadid">
          <DataField>leadid</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
      </Fields>
    </DataSet>
  </DataSets>
  <ReportSections>
    <ReportSection>
      <Body>
        <ReportItems>
<...deleted...>
      <Width>5in</Width>
      <Page>
        <LeftMargin>1in</LeftMargin>
        <RightMargin>1in</RightMargin>
        <TopMargin>1in</TopMargin>
        <BottomMargin>1in</BottomMargin>
        <Style />
      </Page>
    </ReportSection>
  </ReportSections>
  <ReportParameters>
    <ReportParameter Name="days">
      <DataType>Integer</DataType>
      <Prompt>Days Old</Prompt>
      <ValidValues>
        <ParameterValues>
          <ParameterValue>
            <Value>5</Value>
            <Label>5 Days</Label>
          </ParameterValue>
        </ParameterValues>
      </ValidValues>
    </ReportParameter>
  </ReportParameters>
  <ReportParametersLayout>
    <GridLayoutDefinition>
      <NumberOfColumns>4</NumberOfColumns>
      <NumberOfRows>2</NumberOfRows>
      <CellDefinitions>
        <CellDefinition>
          <ColumnIndex>0</ColumnIndex>
          <RowIndex>0</RowIndex>
          <ParameterName>days</ParameterName>
        </CellDefinition>
      </CellDefinitions>
    </GridLayoutDefinition>
  </ReportParametersLayout>
  <Language>en-US</Language>
  <ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
  <rd:ReportUnitType>Inch</rd:ReportUnitType>
  <rd:ReportID>3861fd8d-1820-49f9-b63c-0549d36d967a</rd:ReportID>
</Report>

*This post is locked for comments

  • cerebuk897b Profile Picture
    cerebuk897b on at
    RE: Fetch report won't import

    Perfect. Just never occured to me this.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Fetch report won't import

    Hi,

    If you are using a Shared Data Source, delete the Shared Data Source and create one as a Data Source within the Report.

    Save it a an Embedded Connection, Type is: Microsoft Dynamics 365 Fetch, Connection String is: your https location

    Under Credentials > Select Use this user name and password and enter your login details.

    Build the project/report.

    Copy the report rdl from ..project\bin\debug and upload that version.

    Hope it works for you.

    Cheers, Steve

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans