| Stonefield Query SDK |
| ReportEngine.AfterRunReport |
Parameters
A reference to the Stonefield Query Application object, the path for the report file about to be output, the output type ("PREVIEW", "PRINTER", "FILE", or "EMAIL"), the output file name (blank unless the output type is "FILE"), and a Boolean value indicating whether the report ran successfully or not.
Return Value
Any value (Stonefield Query ignores the return value).
Example
Here's an example that logs after a report is run.
Visual FoxPro
lparameters toApplication as SQApplication, tcReportFileName, ; tcOutputType, tcOutputFileName strtofile(tcReportFileName + ' ran by ' + SQApplication.Users.UserName, 'reportlog.txt') return
VBScript
function Main(Application, ReportFileName, OutputType, _
OutputFileName)
dim fso, ts
const ForWriting = 2
set fso = CreateObject("Scripting. FileSystemObject")
set ts = fso.OpenTextFile("reportlog.txt", ForWriting, True)
ts.WriteLine(ReportFileName + " ran by " + Application.Users.UserName)
ts.Close
end function JavaScript
function Main(Application, ReportFileName, OutputType,
OutputFileName) {
var fso, ts ;
var ForWriting= 2 ;
fso = new ActiveXObject("Scripting.FileSystemObject") ;
ts = fso.OpenTextFile("reportlog.txt", ForWriting, true) ;
ts.WriteLine(ReportFileName + " ran by " + Application.Users.UserName) ;
ts.Close ;
}See Also
ReportEngine.BeforeRunReport | Scripts
| Last Updated: 02/05/2008 |