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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Execution Time

Status
Not open for further replies.

mWilson0

Programmer
Aug 10, 2010
1
US
I wish to know how long a report takes to run.
I'm having no luck placing formulas in header and footer.

This is the first of many experiments to improve runtimes.

How can I print the total execution time for a report (in the report -- or sections of it)?
 
Crystal has no internal functions for calculating how long it takes a report to run.

I can think of a couple of ways to do this by writing an application to run the report, though.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
A quick way per report, is to add the print date and time and the data date and time (from the field explorer->special fields). If you save the report exactly when it finishes executing, you can then calculate the difference. In certain cases, you need to make a quick change to something in the report, e.g., stretch the size of a field, and then save to get the print time to update (which should reflect the currentdatetime).

-LB
 
Why not look at the performance information available from within Crystal Reports. There are a few limitations but it's a reasonable rough guide.

The only other solution is to use a formula and a couple of variables to calculate an elapsed time.

First formula ({@StartTime}) in the Report Header:
BeforeReadingRecords: CurrentDateTime

Formula in the Report Footer
DateDiff("s",{@StartTime},CurrentDateTime)

Be interested to see if that can calculate the correct value.

You could then use my Share UFL to save that to an XMl file each time the report runs.


Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top