Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Running Time for Execution

Status
Not open for further replies.

dreman

Programmer
Jan 16, 2002
272
US
Using CR 8.5
Is there a way to define Report Running Time. Please Advice !!!
(I know of a complex way using subreport but dislike subreport)
Thank you.
dré
 
What do you mean by "define Report Running Time"? Are you talking about evaluating how long a report takes to process?

Naith
 
Create two formula fields both using the CurrentTime function. Place one in the report header section and the second in the report footer section.

Then create a third formula that subtracts the two.
//for example
{@outime}-{@intime}

Howard Hammerman,
Crystal Reports training, consulting, books, training material,support. HammerLauch program runs reports without Crystal
howard@hammerman.com
800-783-2269
 
How does that work?

I would have thought that you'd have to compare the report's DataTime with its PrintTime.

Like:

NumberVar ProcessingTime := Datediff("s",(DataDate+DataTime),(PrintDate+PrintTime));
//If you have the UFL DateTimeDiff you just need
//DateTimeDiff("s",(DataTime),(PrintTime));

NumberVar Hours := Truncate (Remainder ( ProcessingTime,86400) / 3600);
NumberVar Minutes := Truncate (Remainder ( ProcessingTime,3600) / 60);
NumberVar Seconds := Remainder ( ProcessingTime , 60);

Totext ( Hours, '00', 0,'') + ':'+
Totext ( Minutes,'00', 0,'') + ':'+
Totext ( Seconds,'00', 0,'')

Naith
 
Thank you, will try both and will let you know.
dré
 
Howard:
Timein formula is= CurrenTime
Timeout formula is= CurrentTime
I get 0.
What I would like is how long it took the report to be processed. Thank you.
dré
 
Is it a long report? I get the same thing, but I was using sample data that produced the report in less than a second.
Are you refreshing the report so that CR is going after the original data? Howard Hammerman,
Crystal Reports training, consulting, books, training material,support. HammerLauch program runs reports without Crystal
howard@hammerman.com
800-783-2269
 
Currentdate isn't being compared to anything else when you just use CurrentDate-CurrentDate at both ends of the report. That's just going to show the amount of time between when the report started writing data to the time it stopped. It doesn't take database processing into account at all.

You need to compare DataDate+DataTime (the time the sql is sent to the database) with PrintDate+PrintTime (the time the report displays the data).

You should place the results in the Report Footer to get the complete report processing time. The formula I've already posted will do this.

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top