The OnExecuteSqlStatementConstructed Event occurs just before SQL is sent to the Data Source to retrieve data for report execution. This Event could be used to inspect, log or modify the SQL that is being used for report execution.
For custom code the arguments array is structured as follows:
- a string representing the execution SQL
SqlObjectclass wrapping the execution SQL string in position one.
For .NET Assemblies the method signature is as follows:
WebReports.Api.Datanamespace needs to be included.
string EventHandlerName(SessionInfo sessionInfo, string executionSql, SqlObject sqlObject)
The OnExecuteSqlStatementConstructed Event expects either a SQL string return, to override the default execution SQL, or null, in which case the execution will continue as normal.