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.