This script is called before an email is send during a report run. You can use this to change settings about the email, such as if you want to attach additional files to the email.
Parameters
A reference to the Stonefield Query Application object, the name of the report, the output type (always "EMAIL"), the output file name, and a reference to a Report object for the report.
Return Value
True if the email should be sent and the report run can continue, False to not send the email and cancel the run.
Example
Here's an example that attaches an additional file to the email. This assumes the AfterData script for the report creates a Microsoft Word document and puts the path to the document into a variable declared public and named WordDocument.
Visual FoxPro
lparameters toApplication as SQApplication, tcReportName, ;
tcOutputType, tcOutputFileName, toReport as Report
if type('WordDocument') = 'C'
toReport.OutputFileName = toReport.OutputFileName + ',' + WordDocument
endif
return .T.
See also
Scripts© Stonefield Software Inc., 2024 • Updated: 06/06/16
Comment or report problem with topic