Server Event: Track report execution time

The amount of time it takes to execute reports can be tracked by using server events in combination with a stored value.

Note. For large-scale tracking, it is recommended to set up Monitoring instead.

This event uses two server events: The first sets a timer when report execution starts, and the second stops the timer when execution ends, then logs the value.

Execution Start

Global Event: OnReportExecuteStart


DateTime startTimeNow = DateTime.Now;

sessionInfo.SetStoredValue("startTime", startTimeNow);

return null; // continue execution

Execution End

Global Event: OnReportExecuteEnd

Namespaces: System.IO


DateTime endTimeNow = DateTime.Now;

string totalTime = endTimeNow.Subtract((DateTime)(sessionInfo.GetStoredValue("startTime"))).TotalMinutes.ToString();

string reportName = sessionInfo.Report.Name;

StreamWriter executionLog = new StreamWriter(@"C:\Exago\ExecutionLog.txt", true);

executionLog.WriteLine("Report Name: " + reportName + "\n" + "Total Time to completion:" + totalTime + " minutes");


return null;

Hidden Article Information

Article Author
Exago Development
created 2017-05-22 21:30:51 UTC
updated 2019-05-16 20:30:43 UTC

track report execution, SAE, server event, events, example, time, timer,
Have more questions? Submit a request