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 :
Business Central forum

Filter page for a report

(0) ShareShare
ReportReport
Posted on by 700

Hi All,

I have to create a new report in Business Central, by applying certain filters, for example Employeee No., Location etc.

How to apply these filters, how to create that filter page. 

Any AL code example to achieve this purpose!

Thanks in advance! 

Categories:
I have the same question (0)
  • Suggested answer
    Avinash B Profile Picture
    1,455 on at

    Hi

    You can use RequestFilterFields for this purpose. You must define the fields that you want to view on the request page.

    Otherwise, define the global variable and use them in the request page.  On OnPreDataItem, use these variable to filter the data item.

    References:

    docs.microsoft.com/.../request-pages

    Regards

    Avinash B

  • Suggested answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    You need to specify like below

    dataitem("Employee Absence"; "Employee Absence")
    {
    DataItemTableView = SORTING("Cause of Absence Code", "From Date");
    RequestFilterFields = "Employee No.", "From Date", "Cause of Absence Code";

    If you want to run the report using code with filters set , then you need to specify those filter on the actual record and then pass that to the report, an example below

    ItemJnlLine.SetRange("Journal Template Name", "Journal Template Name");
    ItemJnlLine.SetRange("Journal Batch Name", "Journal Batch Name");
    REPORT.RunModal(REPORT::"Inventory Movement", true, true, ItemJnlLine);

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 > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans