Dates on reports
bRahms
Member Posts: 44
This is what we should develop:
In the requestform the user can specifie a date (even in the past). Then when he gave a date the enddate should be the end of that month and the begindate the beginning of the given month.
So f.e.: When he gave up 05/03/07, the startdate should be 01/03/07 and the enddate should be 31/03/07.
Next thing is that the report has to show al the FileID's that has been openend in March 2007.
To admit.. i don't have any clue how to begin on this and since we're running out of time, I don't have time to take a course to finish this task. Anyone willing to help?
In the requestform the user can specifie a date (even in the past). Then when he gave a date the enddate should be the end of that month and the begindate the beginning of the given month.
So f.e.: When he gave up 05/03/07, the startdate should be 01/03/07 and the enddate should be 31/03/07.
Next thing is that the report has to show al the FileID's that has been openend in March 2007.
To admit.. i don't have any clue how to begin on this and since we're running out of time, I don't have time to take a course to finish this task. Anyone willing to help?
0
Answers
-
Hi
1) BeginDate := CALCDATE('<-CM>',RequestDate); // Begining of Month
EndDate := CALCDATE('<+CM>',RequestDate); // End of Month
2) Not sure what you mean by fieldid :?:
Regards
Albert
Sorry FielID's0 -
An example will sort things out:
I've got in tblFile a PK set on FileID and i have a FileDate (= the date the file is made).
File ID FileDate
1 11/02/07
2 24/02/07
3 03/03/07
4 12/03/07
5 01/04/07
So when the user gives in the requestform of the report: 05/03/2007, and he pushes OK, then we should get a report of alle the FileID's who had been made in March -> FileID's 3 and 4.0 -
Ok on the report
set dataitem to tblFile and on on properties selct
ReqFilterFields and put FileDate
in OnPreDataItem Section and the code that I gave you in my first reply
<Edit>
after the set start and end dates
SETRANGE(FileDate,StartDate,EndDate);
Regards
Albert0 -
Thx for the help! It works fine now
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 333 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