Exago Logo
Generic filters
Exact matches only

Global Event: OnExecuteSqlStatementConstructed

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:

args[] contains:

  1. a string representing the execution SQL
  2. a SqlObject class wrapping the execution SQL string in position one.

For .NET Assemblies the method signature is as follows:


The 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.

Was this article helpful?
4.5 out of 5 stars
5 Stars 0%
4 Stars 100%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Table of Contents