web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

How to fetch data from three different entities using fetch xml query in SSRS reports into one single report.

(0) ShareShare
ReportReport
Posted on by 342

I want to fetch data from three different entities, say e.g. Entity C is child to Entity B and B is child to Entity A, I want to fetch data using fetch xml query from all the three different entities in to one single report, how can this be achieved.

  • Scosec Profile Picture
    95 on at

    Hi Sandy,

    You can create a <link-entity> inside your fetchxml to join related entities.

    Also you could choose to install the XRM toolbox. There is a FetchXML builder that makes it pretty easy to select the appropiate data.

    Link: https://www.xrmtoolbox.com/

    Microsoft docs: docs.microsoft.com/.../use-fetchxml-construct-query

  • Verified answer
    Community Member Profile Picture
    on at

    Hi Sandy,

    You can use Advanced Find to build fetch xml and download it, which is easy.

    As you mentioned, Entity C is child to Entity B and B is child to Entity A.

    1.Go Advanced Find.

    pastedimage1605598804899v1.png

    2.select parent entity as your need, then select related entities under ‘Related’, and as the same operation for third entity.

    pastedimage1605598828843v2.png pastedimage1605598834606v3.png

    3.clcik Download Fetch Xml.

    pastedimage1605598968205v4.png

    Also, you can try to use (FetchXml Builder ) xrmtoolbox.

    (1) select one entity.

    pastedimage1605600063440v1.png

    (2) right click entity A, click Add and link-entity, and you can click Select attributes to select fields you need.

    pastedimage1605599797978v6.png

    (3) Result view.

    pastedimage1605599939363v7.png

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • Suggested answer
    Pawar Pravin Profile Picture
    5,237 on at

    In addition with above suggested answer, create link entity relation in advance find and once you download it then change inner to outer in xml relationship

  • Suggested answer
    Sandy Hello Profile Picture
    342 on at

    Thanks Leah for your response advance find option helped me to fetch query for all the three entities together, but i have not used any xrmtoolbox here. Below code helped me.

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">

    <entity name="A">

         <attribute name="X" />

    <link-entity name="B">

         <attribute name="Y" />

    <link-entity name="C">

          <attribute name="Z" />

    </link-entity>

    </link-entity>

    <filter type="and">

    </filter>

     </entity>

    </fetch>

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Syed Aqib Raza Profile Picture

Syed Aqib Raza 96

#2
11manish Profile Picture

11manish 90 Super User 2026 Season 2

#3
ParthPatel249 Profile Picture

ParthPatel249 80

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans