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

How to calculate duration of report runtime?

Status
Not open for further replies.

hfroede

Programmer
Jul 26, 2006
2
DE
For a good scheduling I have to know how long a report takes. (handling about 900 reports) The following I tried to get seconds, but it's not working, result is 0. Who can help?

report header:

beforereadingrecords;
datetimevar starttime := CurrentDateTime;

report footer:

whileprintingrecords;
datetimevar starttime;
datediff('s', starttime, CurrentDateTime);

Thanks

Gruß, Holger


wocogroup.com
CR/BO XI R2, MS Server 2003, Oracle, ERP FOSS/Ordat, ClientSystem FIS
 
You use of the word "scheduling" indicates that what you really need to know is how long a report takes to run in Crystal Enterprise. If this is the case, then the run time in Crystal Pro will not be of much help to you. But if you want to see that number, look in the Report menu under Performance Infomation, then select Performance Timing (you must run or refresh the report in order for this to be accurate).

Run times in Crystal Enterprise, however, are in no way related to the Performance Timing figure shown Crystal Pro. There are a number of variables that affect report run times in Crystal Enterprise. Heavy traffic can extend run times significantly; another major factor is parameter selection (do your parameters call for a small amount of data or a large amount?).

The way I try to manage this is to test run times under "ideal conditions." In other words, I will pick a time when the CE traffic is very light or non-existent, and schedule a report to run for its "short" version (minimal data) and its "long" version (maximum data). Then I check the Start Time and End Time in the Status specs. (Note: this can also identify reports that have SQL problems like formulas in the record selection criteria that force the reading of an entire table just to get a handful of records.)

Unfortunately, there is no clear method of predicting performance in heavy traffic. We have had to do a number of different things to optimize performance in CE, but the most important one is to optimize each report for best SQL and miminum run time. This has done more to speed up report delivery in heavy traffic than anything else.

With 900 reports, I don't envy you this task. My guess is that some (or even many) of those reports could be consolidated, others maybe could be scheduled to run after hours. If your reports are "fine-tuned" for good SQL to the server, CE seems to do a really good job with heavy traffic. Our heavy traffic days were absolute disasters before we started optimizing the SQL. You can also add another CPU to the server to boost performance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top