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

Average Formula

Status
Not open for further replies.

WiZoRioT

IS-IT--Management
May 30, 2008
5
US
Newbie to Crystal am I!

My first attempt at a report in crystal is gather data for LastFullMonth filtering for Priority 1 Issues. I can gather the data via (ODBC) and present it nicely (even have a litle graph to show number of Incidents perday). I created a formula for Time To Resolution. It returns in Seconds.

DateDiff ('s', {A_Reporting_HPD_Incident_Base.Reported_Date} ,{A_Reporting_HPD_Incident_Base.Last_Resolved_Date} )

I then wrote another formula to convert seconds into Days/hours/mins/Secs format 00:00:00:00.

WhilePrintingRecords;
NumberVar TotalSec := {@ttr};
NumberVar Days := Truncate (TotalSec / 86400);
NumberVar Hours := Truncate (Remainder ( TotalSec , 86400) / 3600) ;
NumberVar Minutes := Truncate (Remainder ( TotalSec , 3600) / 60) ;
NumberVar Seconds := Remainder (TotalSec , 60) ;
Totext ( Days , '##' ) + ':' +
Totext ( Hours , '00' ) + ':' +
Totext ( Minutes , '00' ) + ':' +
Totext ( Seconds , '00' )


But not I want to sum Incident count and average Time to resolution. And Im stuck. Any suggestions?

Thank you in advance for your help.
 
Your field that returns seconds, simply right click it, select insert, summary and make it an average summary operation.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top