Report Document-Level Events

The following table lists the document-level events that are available for reports.

Command Action
Activate Executes when the report receives the focus within the Statistica workspace.
BeforeClose Executes when you close the report. Before the document closes, the events within this function will first execute. An example of using this feature would be to add additional functionality, such as saving the file to multiple locations or exporting it to another application.
BeforePrint Executes when you print a report. Before the report prints, the events within this function will first execute. Examples of using this feature would be to prevent users from printing the document or adding new functionality such as calling an alternate, customized printing dialog.
BeforeRightClick Executes when you right-click anywhere on the report. Before the shortcut menu is displayed, the events within this function will first execute. An example of using this feature would be to add additional functionality to displaying shortcut menus, such as highlighting the entire contents of the report.
BeforeSave Executes when you save changes made to the report. Before the changes are actually saved, the events in this function will first execute. An example of using this feature would be to prevent users from permanently changing a report.
Deactivate Executes when the report has lost the focus to another window within Statistica.
OnClose Executes when the report is being closed.
Open Executes when the report is being opened. Note, this will not run unless autorun was specified when the macro was last edited.
SelectionChanged Executes when the focus within the report has moved.

For additional events, see Statistica Events, Application-Level Events, Graph Document-Level Events, Spreadsheet Document-Level Events, and Workbook Document-Level Events.

For examples, see Application-Level Events Example and Document-Level Events Example.