Run report "attempted to issue a client callback"
Alexander95
Member Posts: 17
I am using a console application which runs specified reports/codeunits from Dynamics NAV 2013 version. The process is done by passing parameters down fromt he console application to the published web service. I can run some objects, but this one is causing me a bit of trouble to get going.
-OnPreReport-
rImportExportEngine.GET('Export');
tFileName := rImportExportEngine.GetFileName();
tSeparator := FORMAT('|');
// create file
CLEAR(fOut);
fOut.TEXTMODE := TRUE;
fOut.CREATE(rImportExportEngine."Folder Path" + tFileName);
-OnPostReport-
fOut.CLOSE;
COPY(rImportExportEngine."Folder Path" + tFileName,rImportExportEngine."Archive Folder Path" + tFileName);
The code did contain an excel buffer, but I removed it. Any clue would be great.
-OnPreReport-
rImportExportEngine.GET('Export');
tFileName := rImportExportEngine.GetFileName();
tSeparator := FORMAT('|');
// create file
CLEAR(fOut);
fOut.TEXTMODE := TRUE;
fOut.CREATE(rImportExportEngine."Folder Path" + tFileName);
-OnPostReport-
fOut.CLOSE;
COPY(rImportExportEngine."Folder Path" + tFileName,rImportExportEngine."Archive Folder Path" + tFileName);
The code did contain an excel buffer, but I removed it. Any clue would be great.
0
Answers
-
Does rImportExportEngine.GetFileName() bring up a dialogue under some circumstances? Any GUI is not allowed.0
-
client callback only comes up when there is some dialogue box that's comes up in between of the code which is being execute where GUI is not available.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
I have removed all code which would cause any dialogue boxes to come up. I am still getting the same error. At the moment, I can only think that the error is caused by a dialogue box which opens when running an object, trying to open the RTC. This is part of 2013 and is the same for all report objects in the classic client. Is there a way to run objects without having the RTC open as well as the classic client?0
-
Can you show the code for the rImportExportEngine.GetFileName() function?0
-
IF GUIALLOWED THEN BEGIN
rImportExportEngine.GET('Item Export');
tFileName := rImportExportEngine.GetFileName();
END;0 -
What I want to see is the code in the GetFileName() function itself as this maybe causing the issue.
It looks like you have changed the code in your report and that's now the code that calls the rImportExportEngine.GetFileName() function. If so then are you setting tFileName to something when GUIALLOWED is false - i.e. when it's running as a Web Service?
0 -
This is the only part of the code which includes GetFileName(). There hasn't been any change from the original code as far as I'm aware, except for the fact I've included an IF GUI ALLOWED.0
-
Ok but what does the GetFileName() function actually do - it's the code inside this function that I'm asking you to share. It could be the code in there causing the error but without being able to see the code how can we know and therefore help?0
-
Sorry. I am still new to this so I did not fully understand what you were meaning. Here is the code from the GetFileName function
EXIT(STRSUBSTNO("File Name",FORMAT(CURRENTDATETIME,0,"Date and Time Format")));0 -
That looks OK except for the fact that with the IF GUIALLOWED statement the tFilename never gets set when it gets run as a web service - you need to fix that.
Now try commenting all the code in the OnPreReport and OnPostReport just to double check. If you still get the error then you know it's some other code causing the problem.0 -
Just check the Copy statement , when system tries to execute copy files, throwing Clientcall back0
Categories
- All Categories
- 75 General
- 75 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
