Session Execution Time On Cached/Snapshotted Reports

  • I am currently using the following in the footer of all reports.

    ="Execution Time: " +

    IIf(System.DateTime.Now.Subtract(Globals!ExecutionTime).TotalSeconds < 1, "0 seconds",

    (

    IIf(System.DateTime.Now.Subtract(Globals!ExecutionTime).Hours > 0, System.DateTime.Now.Subtract(Globals!ExecutionTime).Hours & " hour(s), ", "") +

    IIf(System.DateTime.Now.Subtract(Globals!ExecutionTime).Minutes > 0, System.DateTime.Now.Subtract(Globals!ExecutionTime).Minutes & " minute(s), ", "") +

    IIf(System.DateTime.Now.Subtract(Globals!ExecutionTime).Seconds > 0, System.DateTime.Now.Subtract(Globals!ExecutionTime).Seconds & " second(s)", ""))

    )

    Unfortunatly, this only show the cached time. We want to be able to show the user's session runtime in the report. Although this is captured in the executionlogview3 of the report server, there is not global variable to present this information.

    Has anyone found a workaround to show the runtime of the user exection?

  • Beginning with SSRS 2008 R2, you can create a report variable and assign the execution time to the variable. That value will remain constant as long as the report is open - use a reference to the variable in your footer and you should get what you're after.

  • Stacia,

    I tried what you suggested, but sadly the results are the same.

    I created a variable call varExecutionTime, set it as read only and the value as Globals!ExecutionTime

    Assigned the expression in the report footer to Variables!varExecutionTime.Value and the result is the same.

    Are variables in report footers treated differently?

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply