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

Need Help Averaging by Call Type (Hours:Minutes)

Status
Not open for further replies.

proflola

IS-IT--Management
Jul 29, 2000
62
0
0
US
I can do an summary averages of the duration of calls with the following formula:
Local Numbervar TotalSec := Average ({@duration})*60;
Local NumberVar Hours := Truncate(Truncate(TotalSec/60)/60);
Local NumberVar Minutes := Remainder(Truncate(TotalSec/60),60);
Totext ( Hours, '0', 0,'') + ':'+
Totext ( Minutes,'00', 0,'')

Now, I'd like it to average by the CallLog.CallType field. How would I do that? The summary fields don't allow me to convert the information into the hours:minute format.

Thanks,

Sandy
 
Do you mean that you would like to break down the values into their respective call type values?

If that's the case, create a group in the main report by the call type and place your formula in the group header or group footer with this slight change:

Local Numbervar TotalSec := Average ({@duration},{CallLog.CallType})*60;
Local NumberVar Hours := Truncate(Truncate(TotalSec/60)/60);
Local NumberVar Minutes := Remainder(Truncate(TotalSec/60),60);
Totext ( Hours, '0', 0,'') + ':'+
Totext ( Minutes,'00', 0,'')

I supplied the original solution to your problem so I understood the requirement, however you need to take the time to supply baic technical information in your posts, other people helping don't know what you're talking about here, such as the data type and example of what's in the call type.

Considerate posters include that information as well as their Crystal version snd the database connectivity used.

-k
 
Synapsevampire

Thanks again! I'm try to be more explicit next time. Hopefully, my next questions will come much later. I really appreciate this forum and definitely want to be a "considerate" poster.

Thanks again,

Sandy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top