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.
Signature
For custom code the arguments array is structured as follows:
args[]
contains:
- a string representing the execution SQL
- a
SqlObject
class wrapping the execution SQL string in position one.
For .NET Assemblies the method signature is as follows:
NoteThe
WebReports.Api.Data
namespace needs to be included.
string EventHandlerName(SessionInfo sessionInfo, string executionSql, SqlObject sqlObject)
Expected Return
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.