Hi,
My client doesn't have Xmlports in their licence, thus wants to export data in a CSV via Reports.
Can we create a report on the server, ProcessingOnly, that exports data without getting the error that the file is already open?
My client doesn't have Xmlports in their licence, thus wants to export data in a CSV via Reports.
Can we create a report on the server, ProcessingOnly, that exports data without getting the error that the file is already open?
OnPreDataItem=BEGIN tpath := 'C:\Users\User\Documents\'; tFilename := tpath + 'listing-'+ FORMAT(TODAY,0,'<day,2>-<month,2>-<year,2>')+ FORMAT(TIME, 0, '<hour,2><minute,2><second,2>') +'.' + 'csv'; CLEAR(fFileToExport); CLEAR(objFileSystem); CREATE(objFileSystem, TRUE, TRUE); IF NOT objFileSystem.FileExists(tFilename) THEN fFileToExport.CREATE(tFilename) ELSE BEGIN fFileToExport.TEXTMODE(TRUE); fFileToExport.OPEN(tFilename); END; CLEAR(objFileSystem); fFileToExport.TEXTMODE(TRUE); fFileToExport.WRITEMODE(TRUE); fFileToExport.WRITE(';;"Test Column 3"'); END; OnAfterGetRecord=BEGIN fFileToExport.WRITEMODE(TRUE); fFileToExport.TEXTMODE(TRUE); fFileToExport.WRITE('test 2'); END; OnPostDataItem=BEGIN CLEAR(fFileToExport); END; }Thanks in advance for your help