Skip to main content

Notifications

Business Central forum

Lookup filter on a report

Posted on by 700

Hi All,

pastedimage1568034181974v1.png

In the above screenshot, the office 'location filter' is actually a lookup. But, on the filter page the lookup option is not available.

Is there any way to fix it ?

Categories:
  • RE: Lookup filter on a report

    Yes, it has  LookupPageID

  • Suggested answer
    TeddyH Profile Picture
    TeddyH 12,868 Super User 2024 Season 1 on at
    RE: Lookup filter on a report

    Check if your Office Location table has a LookupPageID or not.

  • RE: Lookup filter on a report

    TableRelation has been put on the Office Location field in the table.

  • Suggested answer
    TeddyH Profile Picture
    TeddyH 12,868 Super User 2024 Season 1 on at
    RE: Lookup filter on a report

    When you put Office Location as RequestFilterFields, BC will look at the table and use whatever properties in that specific field.

    Because the Office Location in table Employee does not have table relation, you do not get the lookup.

  • RE: Lookup filter on a report

    I think you are not getting my question. Why I will use table extension in the creation of report.

    Can you plz refer to the screenshot and the query, again

  • Hannes Holst Profile Picture
    Hannes Holst 5,767 on at
    RE: Lookup filter on a report

    You must set the TableRation-property in the TableExtension-Object.

  • RE: Lookup filter on a report

    report 50100 EmployeeAllReport

    {

       Caption = 'Employee-All';

       UsageCategory = ReportsAndAnalysis;

       ApplicationArea = All;

       DefaultLayout = RDLC;

       RDLCLayout = 'EmployeeAllReport.rdl';

       dataset

       {

           dataitem("Employee"; Employee)

           {

               RequestFilterHeading = 'Employee-All';

               RequestFilterFields = "Office Location", "status";

               column(No_; "No.")

               {

               }

               column(Title; Title)

               {

               }

               column(First_Name; "First Name")

               {

               }

               column(Last_Name; "Last Name")

               {

               }

               column(Birth_Date; "Birth Date")

               {

               }

               column(Job_Title; "Job Title")

               {

               }

               column(Civil_Status; "Civil Status")

               {

               }

               column(Gender; Gender)

               {

               }

               column(Blood_Group; "Blood Group")

               {

               }

               column(Identification_Type; "Identification Type")

               {

               }

               column(Identification_number; "Identification number")

               {

               }

               column(Nationality; Nationality)

               {

               }

               column(Employment_Date; "Employment Date")

               {

               }

               column(Department; Department)

               {

               }

               column(BGV_completed; "BGV completed")

               {

               }

               column(Office_Location; "Office Location")

               {

               }

               column(Number_of_Dependants; "Number of Dependants")

               {

               }

               dataitem(EmploymentDetailsHeader; EmploymentDetailsHeader)

               {

                   RequestFilterFields = "EmploymentType";

                   //DataItemTableView = sorting();

               }

           }

       }

       // requestpage

       // {

       //     layout

       //     {

       //         area(Content)

       //         {

       //             group(GroupName)

       //             {

       //                  field(Name; SourceExpression)

       //                  {

       //                      ApplicationArea = All;

       //                 // }

       //             }

       //         }

       //     }

       //     actions

       //     {

       //         area(processing)

       //         {

       //             action(ActionName)

       //             {

       //                 ApplicationArea = All;

       //             }

       //         }

       //     }

       // }

       var

           myInt: Integer;

    }

    This is the code for my report. Where to put TableRelation.

    I tried, but it is not accepting.

  • Hannes Holst Profile Picture
    Hannes Holst 5,767 on at
    RE: Lookup filter on a report

    Hi,

    You have to set the TableRelation-property of that field in your Extension.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans