Event scripts are called from various places in Stonefield Query. For example, just before the Login dialog is displayed, the Application.BeforeLogin script is called. When the user chooses the About Stonefield Query function from the Help menu, the About dialog calls the About.Settings script to fill its list of settings.
The following are the event scripts available in Stonefield Query:
At application startup, events fire in this order:
Splash screen appears.
Reports Explorer window appears.
GetDataSources scripts for any databases that have one.
GetDataSources scripts for any databases that have one (executed a second time before the Login dialog appears)
Login dialog appears.
OpenDataSource scripts for any databases that have one.
Code in Setup.sqs if that file exists.
DataEngine.AfterDataGroupsLoaded (executed a second time)
ReportEngine.AfterGetFolders (may be executed multiple times: once for every expanded folder)
ReportEngine.SetReportProperties (for the initially selected report)
Reports appear in Reports Explorer.
During a report run, events fire in this order:
Code in the BeforeData script for the report if there is any.
Select scripts for any tables that have one.
DataEngine.BeforeSendSQLStatementToDatabase (only if there are some tables in the report that do not have a Select script)
Code in the AfterData script for the report if there is any.
ReportEngine.BeforeCreateFile (if the report is output to a file)
ReportEngine.BeforeSendEmail (if the report is being emailed)
ReportEngine.PreviewReport (if the report is being previewed)
Code in the AfterRun script for the report if there is any.
© Stonefield Software Inc., 2018 • Updated: 01/13/17
Comment or report problem with topic