Date filter in a report - can I set it through calcdate?
Josetxo
Member Posts: 92
Hello all,
It would be great if I could set the ReqFilterFields of a report in an unattended way.
I'd like to set the "Posting Date" Required Filter Field with a data range that would hold the CALCDATE('-8D', TODAY)..CALCDATE('-1D', TODAY).
Unfortunately, it seems not to work this way.
Can I set the date filter in such a way that it takes from a 8 days before to yesterday?
Many thanks in advance,
Josetxo
It would be great if I could set the ReqFilterFields of a report in an unattended way.
I'd like to set the "Posting Date" Required Filter Field with a data range that would hold the CALCDATE('-8D', TODAY)..CALCDATE('-1D', TODAY).
Unfortunately, it seems not to work this way.
Can I set the date filter in such a way that it takes from a 8 days before to yesterday?
Many thanks in advance,
Josetxo
0
Answers
-
You have to do that before running the report:
recSomeRecordWithPostingDate.RESET; recSomeRecordWithPostingDate.SETRANGE("Posting Date",CALCDATE('<-8D>', TODAY),CALCDATE('<-1D>', TODAY));and then run the report:repReport.SETTABLEVIEW(recSomeRecordWithPostingDate); repReport.RUNMODAL;
PS: use < and > in a dateformula to make it language independant. (in Italian I would need to use '-8G', and it doesn't work in ENU, but '<-8D>' always works)Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thanks Kriki, solved this way. Great support from Mibuso once more
0 -
:?: Is this solution means I need to develop 2 Reports, one is input those codes, another one is called by the "repReport"?
thanks.0 -
It is not necessary to use another report. If you have a menuitem on a menubutton on a form, you can put the code in there (or even better: call a codeunit that puts the code) and then run the report.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Hi kriki, thanks a lot, I completed it as you told.0
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
- 322 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