The OnReportExecuteInit Event occurs at the beginning of the report execution process similar to OnReportExecuteStart, but triggers before the Report Viewer’s rendering information metadata file has been created and sent to the client. This is in contrast to OnReportExecuteStart which triggers after the metadata is created.
This Event could be used to make modifications to column labels or column widths based on schema information, for example, prior to the generation of the metadata file being created.
This event will be called for all report execution types, including those via:
For custom code the args[]
array is structured as follows:
args[]
is empty
For .NET Assemblies the method signature is as follows:
string OnReportExecuteInit(SessionInfo sessionInfo)
The OnReportExecuteInit Event expects a string to be returned. Based on the return string there are three possible results.
The report being executed can be accessed through the sessionInfo
object by using sessionInfo.Report