Sunday, February 19, 2012

global execution

hey there

Reporting services - page footer

I have got this off the ssw.com.au

Execution Time

="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)", ""))
)

and it is supposed to show like this

Execution time: 1 minute, 10 seconds

but all I get is

Execution Time: 0 Seconds on all reports

Can someone tell me what is wrong please?

jewel

Hello Jewel,

Is your report running in less than a second? Try this one and see if anything shows in your textbox:

="Execution Time: " +
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), ", "") +
IIf(System.DateTime.Now.Subtract(Globals!ExecutionTime).Milliseconds > 0, System.DateTime.Now.Subtract(Globals!ExecutionTime).Milliseconds & " millisecond(s)", "")

Jarret

|||

thanks Jarret

yes that showed different milliseconds so I guess my report is right then lol.

thanks

No comments:

Post a Comment