Event Handlers can either be set to run during the execution of every report or to only be called when executing specific reports.
NOTE. When multiple Event Handlers are set to run for a single Event, all the Event Handlers are run using the same input values and then the first non-null return value is used by Exago. This means that the return value of Report-specific Event Handlers will take precedence over global Event Handlers.
Ex. Suppose there is a global Event Handler for OnExecuteSqlStatmentConstructed that logs each reports SQL query and a report specific Handler that modifies the ‘Where’ clause of the SQL. When the specified report is run, both Handlers will be executed and return an SQL string. If non-null, the modified SQL from the report specific Event Handler will be utilized by Exago to query the database.
To set an Event Handler to be report specific:
In the Administration Console:
- Set the Event Handler’s Global Event to None. Click Apply or Ok.
- In the Feature/UI Settings set Show Events Window to True. Click Apply or Ok.
In the Reporting Application:
- In the Main Menu select the desired report and double click or click the edit button.
- Select the Report Options drop-down menu and hover over Advanced. Click Events. This will cause the Events Menu to appear.
- In the Event Menu click the Add button.
- From the Event dropdown select when the Event Handler should be called.
- From the Action dropdown select which the desired Event Handler.
- Click Okay and save the report.