Date filter in nav

bharathnan
Member Posts: 92
Hi all,
Good day,
I have created a report to show the invoices of all customers for the last five years, now I am able to filter the invoices only for the report and I am unable to filter the dates. Can anyone help me on how to filter the date for last five years from the current date.
Thanks in advance
Regards
Bharath k
Good day,
I have created a report to show the invoices of all customers for the last five years, now I am able to filter the invoices only for the report and I am unable to filter the dates. Can anyone help me on how to filter the date for last five years from the current date.
Thanks in advance
Regards
Bharath k
0
Best Answer
-
Simply do
SETRANGE("Posting Date", CALCDATE('<-5Y>', TODAY), TODAY);5
Answers
-
LastFiveYearDate =
DMY2DATE(DATE2DMY(TODAY,1),DATE2DMY(TODAY,2),DATE2DMY(CALCDATE('<-CY-5Y>',TODAY),3));
LastFIveYearDate = MESSAGE('%1',CALCDATE('<-5Y>',TODAY));
This will return you the last 5 year date from current date. LastFiveYearDate is a date variable. Both will have same output.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
Simply do
SETRANGE("Posting Date", CALCDATE('<-5Y>', TODAY), TODAY);5 -
Thanks for your reply guys,
Now one more thing ,I want to add no. Of invoice field from the customer table to the current report and it should show only invoices for the last 3 months .Can anybody help me...MOreover it should include all the invoices which has been shipped and not shipped also.
Thanks in advance .
Warm regards,
Bharath-1
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions