Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Answered

How to create report with record that has lookup field and subgrid?

Posted on by 2,645

Would like to get a report some how that will show me all opportunities with Food = Pizza, and see all the Restaurant Types for these opportunities within a report.
The Restaurant Types are in a subgrid on the Opportunity form.  I can't seem to pull an advanced find query to make this happen.

The Food field on the Opportunity form is a lookup to the Food entity

There is a N:N relationship between Opportunity and Restaurant Types.

Any help is appreciated, thank you.

  • Suggested answer
    USA80 Profile Picture
    USA80 2,645 on at
    RE: How to create report with record that has lookup field and subgrid?

    The field was not searchable, so I had to have searchable on the field = Yes, then I could see it.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to create report with record that has lookup field and subgrid?

    Hi USA80,

    It’s so strange, all fields of opportunity will show in the dropdown list by default.

    1.Are you sure Food and opportunity is 1:N relationship and lookup field has created.

    2.Make sure 'Record type' is opportunity.

    pastedimage1618888555748v1.png

    3.Try to use 'Food' as record type value and select 'name' field of food entity as column.

    pastedimage1618888809510v2.png pastedimage1618888826309v3.png

    4.Create new custom entity and build 1:N relationship with opportunity, then check it's lookup field can appear in the list or not.

    Regards,

    Leah Ju

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

  • USA80 Profile Picture
    USA80 2,645 on at
    RE: How to create report with record that has lookup field and subgrid?

    I can't see it from the layout area of the wizard. When I click on Add column, the lookup field doesn't appear, so I can't select it.  It is only this lookup field that I can't see in the drop down of fields.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to create report with record that has lookup field and subgrid?

    Hi USA80,

    Can you provide screenshot about it? Which step you can’t select ‘Food’ lookup field?

    Only ‘Food’ lookup field can’t be selected? Other Lookup fields can be select or not?

    Regards,

    Leah Ju

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

  • USA80 Profile Picture
    USA80 2,645 on at
    RE: How to create report with record that has lookup field and subgrid?

    I can't see the "Food" field to select at all.  This field is on the Opportunity record, and is a lookup to Food Entity.  Why can't I see/select this field?

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to create report with record that has lookup field and subgrid?

    Hi USA80,

    You can use Report Wizard to create a report which contains Food lookup field and sub-grid (N:N relationship).

    Here are steps:

    1.Go Settings > Customizations > Customize the system > Entities > Opportunity > N:N relationship to find the relationship between opportunity and Restaurant Types.

    In Other Entity section, Display Option was set as "Do not Display" by default, you need change it, the N:N relationship can be available in Report Wizard while creating report.

     pastedimage1618540304975v1.png

    2.Reports entity are not show in the sitemap, you can find it in advanced Find(Or you can add it to sitemap directly with app designer).

     pastedimage1618541085068v2.png

    3.Create ‘Report Wizard’ button in new report page, then select entities.

    pastedimage1618541276108v3.pngpastedimage1618541327248v4.png

    4.Set opportunity filter criteria as your need---show all opportunities with Food = Pizza, and add fields you need from these two entities

    pastedimage1618542098515v5.png pastedimage1618542949162v1.png

    5.Run report after setting all.

    pastedimage1618542536254v7.png

    6.Test result:

    pastedimage1618543128001v2.png

    Regards,

    Leah Ju

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

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,570 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,683 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans