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.
True if the email should be sent and the report run can continue, False to not send the email and cancel the run.
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.
lparameters toApplication as SQApplication, tcReportName, ; tcOutputType, tcOutputFileName, toReport as Report if type('WordDocument') = 'C' toReport.OutputFileName = toReport.OutputFileName + ',' + WordDocument endif return .T.
© Stonefield Software Inc., 2018 • Updated: 06/06/16
Comment or report problem with topic