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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Fetching xml for ssrs report ms crm

(0) ShareShare
ReportReport
Posted on by 95

Hi guys,

I have an issue while doing ssrs report. my scenario is i need to create a ssrs report based on the hierarchy of users in ms crm

Example: if a user is created an account he will become owner for the account, for that owner there will be one manager and for that manager there will be another manager like that i need to fetch xml by matching the related levels. please help he out.

I am using below fetch xml but i am able to retreive the data upto one manager level

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="account" enableprefiltering="1">
<attribute name="name" />
<attribute name="telephone1" />
<attribute name="primarycontactid" />
<attribute name="parentaccountid" />
<attribute name="new_mainbusiness" />
<attribute name="new_customercode" />
<attribute name="new_city" />
<attribute name="ownerid" />
<attribute name="accountid" />
<attribute name="new_country" />
<attribute name="new_state" />
<attribute name="address1_postalcode" />
<attribute name="address1_line3" />
<attribute name="address1_line2" />
<attribute name="address1_line1" />
<link-entity name="systemuser" from="systemuserid" to="owninguser" visible="false" link-type="outer" alias="systemuser">
<attribute name="parentsystemuserid" />
<attribute name="createdby" />
</link-entity>
</entity>
</fetch>

  

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    33,628 on at

    Hi,

    did you enable the hierachy setting in CRM?  if yes, you can easily achieve that using below operator.

    [View:https://nishantrana.me/2018/11/22/above-and-under-operator-to-query-hierarchical-data-in-dynamics-365/]

  • Mahesh1431 Profile Picture
    95 on at

    Thanks wei.. but in my scenerio in my ssrs report i have 3 rows in that each row will holds the data in hierarchy.

    for example if user creates an account he will become the owner of the account, that user will have another manager , that manager will have another manager like this i would like to get fetch xml is it possible?

  • Alex Fun Wei Jie Profile Picture
    33,628 on at

    Hi,

    can you show us how you want the data to be displayed?

  • Mahesh1431 Profile Picture
    95 on at

    88253.Screenshot_5F00_1.png

    Please see the above image(ssrs report) in that in first column i am storing the value of the user who created an account in ms crm.

    >In the second column i am storing the value of the manager who is manager for the first column person in above table .(Hierarchy)

    > In the third column i am storing the value of another manager who is manager for the second column person in above table.(Hierarchy) 

    Hope you understood my scenario. now my problem is i am able to store the values of users(managers) upto second column. but i am unable to fetch data for third column. third column manager should come automatically popup based on the second column user

    please help me out from this

    Thanks 

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    33,628 on at

    Hi,

    Have you experienced to use subreport? The concept would be like below. but you have to use matrix in order to show in horizontal line.

    Demo

    below is the hierarchical structure i configured.

    36755.14.PNG

    below is the fetchxml, i am using ken chang as filter, and result it show me diana chang and xxx Asia. Which is correct.

    36755.14.PNG

    So, by using the above video technique, show sub report in main report. You are able to complete your report. Remember you have to use matrix in order to show in horizontal line in subreport.

    Good luck and have fun.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans