SBX - Search With Button

SBX - Forum Post Title

Fetching xml for ssrs report ms crm

Microsoft Dynamics CRM Forum

Mahesh1431 asked a question on 29 Jan 2019 2:52 AM

Question Status

Suggested Answer

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>

  

Reply
Wei Jie Fun responded on 29 Jan 2019 3:41 AM
Suggested Answer

Hi,

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

Reply
Mahesh1431 responded on 29 Jan 2019 5:27 AM

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?

Reply
Wei Jie Fun responded on 29 Jan 2019 6:21 AM

Hi,

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

Reply
Mahesh1431 responded on 29 Jan 2019 10:45 AM

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 

Reply
Wei Jie Fun responded on 29 Jan 2019 9:07 PM
Suggested Answer

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.

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

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.

Reply
Wei Jie Fun responded on 29 Jan 2019 3:41 AM
Suggested Answer

Hi,

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

Reply
Wei Jie Fun responded on 29 Jan 2019 9:07 PM
Suggested Answer

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.

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

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.

Reply

SBX - Two Col Forum

SBX - Migrated JS