May 11, 2012 at 5:20 am
i want to get the execution time of a report, with start and end time.
if any one have the solution then please send me the solution at shubhamagrawal.107@gmail.com
May 11, 2012 at 5:43 am
look at the executionlog view in the reportserver database joined to the catalog table on the report guids to get the names of the reports.
May 11, 2012 at 5:49 am
my friend i want to print the both timing with the report data at the header
for that what i can do.
May 11, 2012 at 5:59 am
use the execution time builtin field which is in the report data toolbox of BIDS or report builder.
to get the time in hh:mm:ss you will need to do a variable which takes in the execution time and does date diffs based on the current time and execution time differences.
May 11, 2012 at 6:05 am
i tryed this but time is changed with the system time, which was not useful for me. if i save the report in excel after 15 minutes of current execution time then i don't get the correct time. i got the time with the addition of 15 minutes, but i want the exact execution time.
May 11, 2012 at 6:08 am
what is your expression to work out the start time and end time based on the execution time field?
May 11, 2012 at 6:10 am
for 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)", ""))
)
May 11, 2012 at 6:22 am
thats due to you using the system date time and that is always changing due to it being the system clock. you would need to use a static starting point to calculate it otherwise your always going to have a moving target.
May 11, 2012 at 6:24 am
then how will i get the static starting and ending point.
please give me the solution.
May 11, 2012 at 6:28 am
declare a parameter or a variable within the report, set it to an expression of the GETDATE() equivilent in SSRS, then use that instead of System.DateTime
May 11, 2012 at 9:46 pm
i tryed this but GETDATE() is not work in as an expression in defining a report variable.
May 11, 2012 at 9:59 pm
i used now , but this time i got an error of substract identifier in the expression. can you give me the correct expression.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply