Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

how to get SSRS reports like Managerial Hierarchy

Posted on by Microsoft Employee

Hi All,

how to get SSRS reports like Managerial Hierarchy, like manager can only his child records and other users can able to see only their child user records. and admin can all the records

Regards,

Praveen.

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to get SSRS reports like Managerial Hierarchy

    What error it is throwing. Share your rdl file here

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to get SSRS reports like Managerial Hierarchy

    I mean rdl file into crm

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to get SSRS reports like Managerial Hierarchy

    while importing this Rdl file it is throwing error

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to get SSRS reports like Managerial Hierarchy

    select fullname,BusinessUnitId,ParentSystemUserId,SystemUserId from filteredSystemUser where domainname<>'' and ParentSystemUserId = @User

    select fullname,BusinessUnitId,ParentSystemUserId,SystemUserId

    from filteredSystemUser

    where domainname<>'' and ParentSystemUserId = dbo.fn_FindUserGuid()

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to get SSRS reports like Managerial Hierarchy

    I want Parent Records Along with their child records

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to get SSRS reports like Managerial Hierarchy

    Yes, That Query is fine. If you want to run it for some specific user then create a user parameter with this dataset:

    select fullname,SystemUserId from filteredSystemUser where statecode = 0

    Use this Parameter to filter the main query:

    select fullname,BusinessUnitId,ParentSystemUserId,SystemUserId from filteredSystemUser where domainname<>'' and SystemUserId = @User

    To get the the report for the current user use this query:

    select fullname,BusinessUnitId,ParentSystemUserId,SystemUserId
    from filteredSystemUser
    where domainname<>'' and systemuserid = dbo.fn_FindUserGuid()
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to get SSRS reports like Managerial Hierarchy

    for this query i am getting all user

    select fullname,BusinessUnitId,ParentSystemUserId,SystemUserId from SystemUser where domainname<>''

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to get SSRS reports like Managerial Hierarchy

    can you please provide SQL Query

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to get SSRS reports like Managerial Hierarchy

    Refer this:

    nishantrana.me/.../hierarchical-report-in-ssrs-to-show-users-and-their-managers-crm

    Use this Query for CRM online:

    <fetch distinct="false" mapping="logical" output-format="xml-platform" version="1.0">
    <entity name="systemuser">
    <attribute name="fullname"/>
    <attribute name="systemuserid"/>
    <attribute name="parentsystemuserid"/>
    <order descending="false" attribute="fullname"/>
    </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

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