Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

Fetchxml report not properly queried over pages

(1) ShareShare
ReportReport
Posted on by 2
Hi Community,
 
It has been observed in latest d365 the SSRS report had an issue with fetch based SSRS report. Data volume is about 3 pages (10846 results) in fetchxml builder execution, but the same query in SSRS got 10415 (-431) record.
 
the query is from incident to subentityA (inner join) and further to subentityB(outer left), couple of conditions all on base class attributes, no crazy complex conditions. 
I have tried inner join for subentityB it is still the same result as hundreds of reports are missing.
 
I was able to identify the difference was from about 30 A record related to the 1 case that missing (join with B = 400ish lines), however when I do a separate query only to this case, the result is correctly counted as ~3000,  size less than a page.
 
Tried multiple tests and the paging in SSRS seems to be problematic and dropping some record in some scenarios.
 
I don't see the SSRS reports are yet legacy, it still remains important components in d365 and many organization would still want it to be reliable.
Please investigate as this is critical.
 
Thanks,
Stanley
 
 
  • SW-04040614-0 Profile Picture
    2 on at
    Fetchxml report not properly queried over pages
    Great thanks to the community!. here is the fetchxml that mimics the best of the one with issue.
     
    tried so far:
    - change the join B from outer to inner - same issue, missing records
    - change the in clause to equal - same issue.
    - adding 'order by incidentid' and 'order by title', the total missed number/records are different
    - tried to use useraworderby = true
    - tried no-lock = true/false, same issue
     
     
    <fetch distinct="false" useraworderby="false" no-lock="true" mapping="logical">
      <entity name="incident">
        <attribute name="owningbusinessunit" alias="owningbusinessunit" />
        <attribute name="leadcaseworkerid" alias="leadcaseworkerid" />
        <attribute name="title" alias="title" />
        <attribute name="statuscode" alias="statuscode" />
        <attribute name="incidentid" />
        <attribute name="casenumber" />
        <filter>
          <condition attribute="caseworkerid" operator="in" value="@Staff" />
          <condition attribute="statuscode" operator="in">
            <value>5000001</value>
            <value>1</value>
            <value>3</value>
          </condition>
          <filter type="or">
            <condition attribute="satelliteofficeid" operator="in" value="@Office" />
            <condition attribute="owningbusinessunit" operator="in" value="@Office" />
          </filter>
        </filter>
        <link-entity name="entityA" from="caseid" to="incidentid" link-type="inner" alias="A">
          <attribute name="A_id" alias="Aid" />
          <attribute name="startdate" alias="startdate" />
          <attribute name="AType" />
         <link-entity name="entityB" from="A_Id" to="A_Id" link-type="outer" alias="B">
            <attribute name="B_id" />
            <attribute name="field_C" />
          </link-entity>
        </link-entity>
      </entity>
    </fetch>
  • ronaldwalcott Profile Picture
    2,268 on at
    Fetchxml report not properly queried over pages
    Did you mean to post this here?
  • MichaelFP Profile Picture
    1,780 Super User 2025 Season 1 on at
    Fetchxml report not properly queried over pages
    It is good to share the fetchxml that you are using and testing. can you share?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,518 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,734 Most Valuable Professional

Leaderboard