"The date is not valid"

Henrik698
Member Posts: 12
Hi,
I am using a Business Central version 14.5.
I am running a report in the job queue. The report is a processing only report, i.e. no RDLC layout.
When running in the job queue, the report fails with an error: "The date is not valid".
Tragically, turning the debugger on does not reveal where the error happens. The arrow just points at the line in codeunit 449:
REPORT.EXECUTE(ReportID,JobQueueEntry.GetReportParameters);
It is strange that when running the report manually, it does not generate an error.
Does anybody out there perhaps have an idea regarding this? Thanks in advance for any hints.
I am using a Business Central version 14.5.
I am running a report in the job queue. The report is a processing only report, i.e. no RDLC layout.
When running in the job queue, the report fails with an error: "The date is not valid".
Tragically, turning the debugger on does not reveal where the error happens. The arrow just points at the line in codeunit 449:
REPORT.EXECUTE(ReportID,JobQueueEntry.GetReportParameters);
It is strange that when running the report manually, it does not generate an error.
Does anybody out there perhaps have an idea regarding this? Thanks in advance for any hints.
0
Best Answer
-
I have found the reason.
The report iterated through a table with a field of the type "datetime" in SQL but the type "date" in BC. Due to some integration, the field in the SQL table had a date value BUT ALSO a time value. This latter (the time value) caused BC to refuse to iterate past the record with a time in the field. This gave the error message "The date is invalid" and the debugger refused to point it out.0
Answers
-
I think you have invalid data in your report parameteres.For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.0
-
Thank you for the suggestion. I don't think that is the explanation because there are no date filters or anything with dates in the report parameters. It is an xml file and I have tried to regenerate it from scratch, still the same result. I have also examined it and there are no errors in the xml, it seems.0
-
I have found the reason.
The report iterated through a table with a field of the type "datetime" in SQL but the type "date" in BC. Due to some integration, the field in the SQL table had a date value BUT ALSO a time value. This latter (the time value) caused BC to refuse to iterate past the record with a time in the field. This gave the error message "The date is invalid" and the debugger refused to point it out.0 -
Good morning, just as a suggestion of where the problem may have come from
Is it possible that the standard feature U31/12/2022 is used in a table that was not prepared for this?0 -
Thanks, that's a good suggestion. But in this case, I don't think that was the explanation. The situation is that the SQL table gets populated through an integration with some 3rd party software. Most likely, the "erroneous" data came from here.0
-
In Date type fields must be time part in SQL column zero (00:00:00). Check SQL data.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
- 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