This script is called just after a report is output to a file or emailed. You can use this to do things such as copy the file to another folder or upload it to an FTP site.

A reference to the Stonefield Query Application object, the name of the report, the output type ("FILE" or "EMAIL"), the output file name, and a reference to a Report object for the report.

Return Value
Any value (Stonefield Query ignores the return value).

Here's an example that copies the output file to an archive folder.

Visual FoxPro

lparameters toApplication as SQApplication, tcReportName, ;
  tcOutputType, tcOutputFileName, toReport as Report
local lcFile
lcFile = justfname(tcOutputFileName)
copy file (tcOutputFileName) to ('C:\Archive\' + lcFile)

See also

ReportEngine.BeforeCreateFile | Report Object | Scripts