# List of Server Events

Server events categorized by activity

## Startup

OnConfigLoadStart – Occurs when the configuration of Exago is initially loaded. Expects a void return.

OnConfigLoadEnd – Occurs after the last API changes have been made to Exago's configuration. Expects a void return.

OnGetUserPreferences – Called to retrieve user preferences when entering the application and editing/executing reports.

OnAfterLoadReportsList (v2016.3+) – Occurs after reports created in Exago have been loaded in the report tree object, for the purpose of allowing additional items to be loaded in the report tree.

## User Interaction

OnReportFailValidation (v2017.1+) – Occurs when a user attempts to edit or run a report which has errors.

OnDataFieldsRetrieved – Occurs after Data Fields are retrieved from specific Data Objects. Expects a Data Table to be returned to indicate how to display the Data Fields.

OnFilterSqlStatmentConstructed – Occurs before the data source is queried to populate the filter dropdown. Expects an SQL string to be returned.

OnReportSaveStart – Occurs at the beginning of the report save process.

OnRenameFolderStart – Occurs when a user attempts to rename a folder. Expects a string to be returned to indicate if execution should proceed.

OnRenameFolderEnd – Occurs when a folder has been renamed. Any return value will be ignored.

## Report Execution

OnReportFailValidation (v2017.1+) – Occurs when a user attempts to edit or run a report which has errors.

OnScheduledReportExecuteStart (v2018.1+) – Occurs when report execution begins on a scheduler service. Expects a string to be returned to indicate if execution should proceed.

OnReportExecuteStart – Occurs when report execution begins. Expects a string to be returned to indicate if execution should proceed.

OnLoadReportParameters – Passes a list of Parameter elements that can be reordered or modified before they are sent to the client for display.

OnParameterSqlStatementConstructed – Occurs after a parameter dropdown object is constructed. Allows for modifying the object SQL.

OnOkParametersDialog – Occurs when OK is clicked on the Parameter Execution Window. Expects a string to be returned to indicate if execution should proceed.

OnOkFiltersDialog – Occurs when OK is clicked on the Filter Execution Window. Expects a string to be returned to indicate if execution should proceed.

OnExecuteSqlStatmentConstructed – Occurs before the data source is queried for report execution. Expects an SQL string to be returned.

OnWebServiceExecuteEnd – Occurs when a web service data source returns data. Expects an xml string to be returned.

OnDataCombined – Occurs when data is combined and initially processed. Expects a Data Table to be returned.

OnReportExecuteEnd – Occurs when a report execution finishes. Return value will be ignored.

OnExportCsvCell – Occurs prior to exporting a CSV cell for the purpose of overriding the standard export results.

OnScheduledReportComplete (v2017.1+) – Occurs when a scheduled report execution completes, regardless of whether it was successful or not.

OnScheduledReportExecuteSuccess – Occurs when a scheduled report is executed. Expects a boolean to be returned to indicate if the report should be sent as scheduled or intercepted.

## Misc

OnSetUserPreferences – Called to save user preferences when a user specifies startup reports or saves interactive html changes as a user report.

OnExceptionThrown – Occurs when an exception is thrown in the Exago user interface. Used to log additional information to the logfile.