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.

Parameters
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).

Example
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

© Stonefield Software Inc., 2023 • Updated: 01/13/17
Comment or report problem with topic