Problem using Date table in a report with DataItemTableView

imurphy
Member Posts: 308
I want to run a report showing the balance of a GL Account for each day in the last 7 days.
My initial reaction was to make use of the Date table and filter it in the designer for the last 7 days. So, I tried filtering on 'Day'. My problem comes with the Period start/end fields
If in properties I add a filter to the DataItemTableView property with a syntax of
Any suggestions?
Ian
My initial reaction was to make use of the Date table and filter it in the designer for the last 7 days. So, I tried filtering on 'Day'. My problem comes with the Period start/end fields
If in properties I add a filter to the DataItemTableView property with a syntax of
CalcDate('<-D7>', Today)it complains. I've tried dozens of different combinations but cannot get filtering on the Period columns to work at all. I simply cannot get the parameters to the CalcDate function correct. I may also be complicating my life here.
Any suggestions?
Ian
0
Comments
-
Hi imurphy,
If I am getting you correctly,
Set the filter in Date - OnPreDataItem() through codeDate.SETRANGE("Period Start",CalcDate('<-7D>',Today)); Date.SETRANGE("Period End",Today);
Sandeep Prajapati
Technical Consultant, MS Dynamics NAV0 -
I've ended up doing something pretty much identical.
My problem is that I was trying to do this via the DataItemTableView property in the properties for the Date object on the report.
Setting 'Period Start' - Filter - CalcDate('<-7D>', Today) in the filter list always resulted in a date error. The same expression in code was fine - which didn't make much sense.
I could enter a fixed date without any problems, just not a calculated date.
Ian0
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