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 :
Microsoft Dynamics NAV (Archived)

Add a filter in request page

(0) ShareShare
ReportReport
Posted on by

Hello,

       i hv created a report based on cust. ledger entry table. Now I need to set a filter on request page i.e. Posting Date(From Date, To Date) . And also if a user leaves those fields empty then he will get an error msg and does not leave the page. How can I do it..Plz help..!!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    Please check report 14

  • Suggested answer
    RockwithNav Profile Picture
    8,637 Super User 2025 Season 2 on at

    Hey Rajat,

    Use This on DateItem OnPreTrigger.

    IF (StartDate = 0D) OR (EndDate = 0D) THEN

    ERROR();

    SETRANGE("Posting Date",Startdate,Enddate)

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Rajat,

    You can maximum give the error message as suggested above, however report will still leave the Request Page and would not be able to stay on the same page.

    You need to again run that particular report and put the required filter.

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

    Create two variables for StartDate and EndDate, add those to the request page and add the following code on the OnPreReport trigger

    IF (StartDate = 0D) OR (EndDate = 0D)  THEN

                                    ERROR('Error Message');

    To set filter if they have the value then you just need add this code

    SETRANGE("Posting Date",StartDate,EndDate);

    As Mohana mentioned please check some standard reports how this logic is done.

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 > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans