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

Percentage Formula Question

Status
Not open for further replies.

tinmar

Technical User
Mar 24, 2003
55
HK
Hi,

Using Crystal 8.5 to an Oracle db, I'm trying to get a percentage figure of the amount of ACW time in Handle Time (Where Handle time is made up of ACW time and two other entities.)

Handle Time and ACW are calculated as follows:
Handle Time = Sum({@Fields - HandleTime}, {@Field - SKL_DATE}, "daily") / 86400;

ACW Time = Sum({@Field - ACW_TIME}, {@CenterGroup}) / 86400;

And the calculation I thought would be right is:
[Its result doesn't match up with manual checking of a percentage.]

whileprintingrecords;
Numbervar Dur1 := Sum({@Field - ACW_TIME}, {@CenterGroup}) / 86400;
Numbervar Dur2 := Sum({@Fields - HandleTime}, {@CenterGroup}) / 86400;

numbervar Dur = (Dur1/Dur2);

ToText(Dur)

Can anyone point out where I'm going wrong?

Thanks for any help
Mike
 
What happens when you write the formula this way?


whileprintingrecords;
Numbervar Dur1 := Sum({@Field - ACW_TIME}, {@CenterGroup});
Numbervar Dur2 := Sum({@Fields - HandleTime}, {@CenterGroup});

numbervar Dur = (Dur1/Dur2);

ToText(Dur)


Scott.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top