'XXXXXXXX' is not a valid date. Error when generating a report in NAV.

riel_mallorca
Member Posts: 2
Hi Guys,
Got this problem when generating a report from NAV 2009 RTC. (Please see attached file).
Report is actually in excel, NAV only fill's in cells of that excel file. Said report is a localized functionality of NAV 2009RTC.
Error only comes when the report is being generated from NAV RTC, however executing the same in NAV Classic does not show this error.
Would really appreciate your feedback
Thanks,
riel_mallorca
Got this problem when generating a report from NAV 2009 RTC. (Please see attached file).
Report is actually in excel, NAV only fill's in cells of that excel file. Said report is a localized functionality of NAV 2009RTC.
Error only comes when the report is being generated from NAV RTC, however executing the same in NAV Classic does not show this error.
Would really appreciate your feedback
Thanks,
riel_mallorca
0
Comments
-
Hey Riel,
As I can see its a genuine error for Date Data types though I don't know how its executing in classic or some different concept is running there as some time format is too coming with that. You may have to write some code like this and calculate your date manually.
DateVariable := COPYSTR(IncomingDateFormat,9,2) + COPYSTR(IncomingDateFormat,6,2) + COPYSTR(IncomingDateFormat,1,4);
EVALUATE(DateCalculated,DateVariable);Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
Hi RockwithNAV,
I will have that one checked with our technical guy as I am functionally oriented.
I am thinking it is some kind of related to the SQL date and time, as I tried restoring the latest backup of the database in my local computer and the reports are working.
Also one more thing, the date that can be seen in the error message is the date of the local computer running the report.
The report is called in the Page Action on a customized page, here is the code for that page action wondering if it would lighten you up on the root cause of my issue.
RecBIRSetup.GET;
IF RecBIRSetup."2307 Report" = 0 THEN
ERROR(Text50000, '2307');
RecWHTTransEntry.RESET;
//RecWHTTransEntry.SETRANGE(RecWHTTransEntry.Type, RecWHTTransEntry.Type::"2307");
IF RecWHTTransEntry.FIND('-') THEN
RecWHTTransEntry.DELETEALL;
Date2307 := DateFilter2307(optQuarter);
//earl 20140515 start
//cduBIRUtility.GetWHTEntry(Date2307, vPayorCode,1);
IF NOT vPerInvoice THEN BEGIN
cduBIRUtility.GetWHTEntry(Date2307, vPayorCode,1, '');
END ELSE BEGIN
recLPurchInvHeader.RESET;
recLPurchInvHeader.SETFILTER(recLPurchInvHeader."No.", vInvoiceDocNo);
recLPurchInvHeader.FINDSET;
cduBIRUtility.GetWHTEntry('', recLPurchInvHeader."Buy-from Vendor No.",1, vInvoiceDocNo);
END;
//earl 20140515 stop
COMMIT;
RecWHTTransEntry.RESET;
REPORT.RUN(RecBIRSetup."2307 Report", TRUE, FALSE, RecWHTTransEntry);
Thanks,
RIEL0 -
Hey Riel,
Yes please check this out with technical guy and ask him to compile the objects once.
One hit and trial solution I can give you is to change the Date format of your machine from 08.10.2015 to 2015.08.10 and then try. Though NAV handles this in itself but you can try this once.
I have many questions in the code that you have pasted, though they may not be related to the above issue but on code standards.
RecBIRSetup.GET;
IF RecBIRSetup."2307 Report" = 0 THEN
ERROR(Text50000, '2307');
RecWHTTransEntry.RESET; //
//RecWHTTransEntry.SETRANGE(RecWHTTransEntry.Type, RecWHTTransEntry.Type::"2307");
IF RecWHTTransEntry.FIND('-') THEN // WHTAS THE USE OF THESE LINES
RecWHTTransEntry.DELETEALL;
Date2307 := DateFilter2307(optQuarter); // WHATS WRITTEN INSIDE THIS FUNCTION
//earl 20140515 start
//cduBIRUtility.GetWHTEntry(Date2307, vPayorCode,1);
IF NOT vPerInvoice THEN BEGIN
cduBIRUtility.GetWHTEntry(Date2307, vPayorCode,1, '');
END ELSE BEGIN
recLPurchInvHeader.RESET;
recLPurchInvHeader.SETFILTER(recLPurchInvHeader."No.", vInvoiceDocNo);
recLPurchInvHeader.FINDSET; WHTAS THE USE OF THIS LINE, USE GET INSTEAD OF THESE 3 LINES
cduBIRUtility.GetWHTEntry('', recLPurchInvHeader."Buy-from Vendor No.",1, vInvoiceDocNo);
END;
//earl 20140515 stop
COMMIT; // IS THIS CODE WRITTEN FOR FORCEFUL TRANSACTION
RecWHTTransEntry.RESET; [/s] WHTAS THE USE OF THIS LINE
REPORT.RUN(RecBIRSetup."2307 Report", TRUE, FALSE, RecWHTTransEntry);Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/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