web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

How to modify date in code for a standard report?

(0) ShareShare
ReportReport
Posted on by 275

Hey all,

I have a question here on how to modify in coding for a standard NAV report (ID: 111 Customer - Top 10 List).

I need to code in the Date Filter parameter such as it becomes my current month-to-date. So for example, my Work Date for today is 30/07/16.

The date filter, when user opens up the report, should be something like "01/07/16..30/07/16"

If work date is 05/08/16 for example, the date filter should then be shown as "01/08/16..05/08/16"

I am trying to code in the 2nd screenshot below at Report Options Page - Designer but seems the desired result does not come out. Can anyone provide me some idea or hints on the code to use?

Thanks in advance

Cheers

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Ashwini Tripathi Profile Picture
    4,624 on at
    RE: How to modify date in code for a standard report?

    RequestPage->OnOpenPage Trigger write:

    Customer.SETFILTER("Date Filter",'%1..%2',DMY2DATE(1),WORKDATE);

  • jasontl Profile Picture
    275 on at
    RE: How to modify date in code for a standard report?

    Thanks Ashwini

    Your code works perfectly.

    Cheers

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Saurav.Dhyani Profile Picture

Saurav.Dhyani 2 Super User 2025 Season 2

#2
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans