OnReportExecuteStart

The OnReportExecuteStart Event occurs at the beginning of the Report Execution process. This Event could be used to check properties of a report and log or stop execution.

Signature

For custom code the args array is structured as follows:

args[] is empty.

For .Net Assemblies the method signature is as follows:

string EventHandlerName(SessionInfo sessionInfo)

Expected Return

The OnReportExecuteStart Event expects a string to be returned. Based on the return string there are three possible results.

Notes

The report being executed can be accessed through the sessionInfo object by using sessionInfo.Report.

Example

The following example shows how each report execution can be written to a log file.

//Writes the current time, companyId, userId and report name to a specified log file.
File.WriteAllText(“C:\ReportExecutionLogFile”, String.Format(“{0}, {1}, {2}, {3}”, DateTime.Now.ToString(), sessionInfo.CompanyId, sessionInfo.UserId, sessionInfo.Report.Name));
//returns null to proceed with execution
return null;