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 :
Small and medium business | Business Central, N...
Suggested Answer

How to add filter section for my customized report in Business Central?

(0) ShareShare
ReportReport
Posted on by 254
Hello everyone,
 
I've created a new report in BC.  I want to add filter section like this picture, but I do not know how can I proceed that.

 
When  I use "ReqFilterFields", I see this error:
  The property 'ReqFilterFields' cannot be used in this contextALAL0124
(property) ReqFilterFields

How can I add filter part to my customized report? 
report 50103 "Vendor Collection"
{
    DefaultLayout = RDLC;
    RDLCLayout = 'VendorCollection.rdl';
    UsageCategory = Administration;
    ApplicationArea = All;

    dataset
    {
        dataitem(VendLedgEntry; "Vendor Ledger Entry")
        {
            DataItemTableView = sorting("Vendor No.", "Entry No.");

            // Example columns - no 'Caption' property here.
            column(VendorNo; "Vendor No.")
            {
            }

            column(VendorPostingDate; "Posting Date")
            {
            }

            column(Amount; Amount)
            {
            }

            column(CurrencyCode; "Currency Code")
            {
            }

            column(RunningBalance; RunningBalance)
            {
            }

            // Initialize and update RunningBalance
            trigger OnPreDataItem()
            begin
                RunningBalance := 0;
            end;

            trigger OnAfterGetRecord()
            begin
                RunningBalance += Amount;
            end;
        }
    }

    var
        RunningBalance: Decimal; 
}
 
Thanks in advance!
I have the same question (0)
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    20,956 Super User 2025 Season 2 on at
    Hi, Try with the below code:
    report 50103 "Vendor Collection"
    {
        DefaultLayout = RDLC;
        RDLCLayout = 'VendorCollection.rdl';
        UsageCategory = Administration;
        ApplicationArea = All;
     
        dataset
        {
            dataitem(VendLedgEntry; "Vendor Ledger Entry")
            {
                DataItemTableView = sorting("Vendor No.", "Entry No.");
                RequestFilterFields = "Vendor No.", "Vendor Name", "Vendor Posting Group"; //RK added
                // Example columns - no 'Caption' property here.
                column(VendorNo; "Vendor No.")
                {
                }
     
                column(VendorPostingDate; "Posting Date")
                {
                }
     
                column(Amount; Amount)
                {
                }
     
                column(CurrencyCode; "Currency Code")
                {
                }
     
                column(RunningBalance; RunningBalance)
                {
                }
     
                // Initialize and update RunningBalance
                trigger OnPreDataItem()
                begin
                    RunningBalance := 0;
                end;
     
                trigger OnAfterGetRecord()
                begin
                    RunningBalance += Amount;
                end;
            }
     
        }
        // RK-start
        requestpage
        {
            layout
            {
                area(Content)
                {
                    group("Options")
                    {
                        field(ShowAmountsInLCY; ShowAmountsInLCY)
                        {
                            ApplicationArea = All;
                            Caption = 'Show Amounts in LCY';
                        }
                        field(NewPagePerVendor; NewPagePerVendor)
                        {
                            ApplicationArea = All;
                            Caption = 'New Page per Vendor';
                        }
                        field(ExcludeVendorsWithBalance; ExcludeVendorsWithBalance)
                        {
                            ApplicationArea = All;
                            Caption = 'Exclude Vendors That Have A Balance Only';
                        }
                    }
                }
            }
        }
        // RK-end
     
        var
            RunningBalance: Decimal;
            // RK-start
            ShowAmountsInLCY: Boolean;
            NewPagePerVendor: Boolean;
            ExcludeVendorsWithBalance: Boolean;
        // RK-end
    }
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    20,956 Super User 2025 Season 2 on at
    You can take reference of this Vendor - Order Detail (308, Report Request)
    Hope this helps as well.
     
     
     
     
     
     
     

     
  • Gerardo Rentería García Profile Picture
    25,390 Most Valuable Professional on at

    Hi, good day
    I hope this can help you, and give you some hints.

    How do I: Add filters in a Report in VSCode with AL? – think about IT

    Best Regards
    Gerardo

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,126

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 744 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 674 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans