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

Display of data

Status
Not open for further replies.

SuperTime

Programmer
Dec 21, 2004
183
US
Following is the formula for which i want to modify the display.

------------------------------------------------------------
@average-delay
------------------------------------------------------------
WhilePrintingRecords;
StringVar Hours1;
StringVar Minutes1;
StringVar Seconds1;
NumberVar avgansdelayday := 0;

If Sum ({ApplicationAbandon.CallsAnswered}, {ApplicationAbandon.Time}) = 0 then
avgansdelayday := Sum ({iSkillsetStat.CallsAnsweredDelay}, {ApplicationAbandon.Time})
Else
avgansdelayday:=Sum ({iSkillsetStat.CallsAnsweredDelay}, {ApplicationAbandon.Time}) /Sum ({ApplicationAbandon.CallsAnswered}, {ApplicationAbandon.Time});

avgansdelayday:=Round( avgansdelayday);

If avgansdelayday < 0 Then
"Cannot have a time less than zero"
Else
(
Hours1:=ToText(Truncate(avgansdelayday/3600),0);
Minutes1:=ToText(Truncate(Remainder(avgansdelayday,3600)/60),0);
Seconds1:=ToText(Remainder(Remainder(avgansdelayday,3600),60),0);

//Display the time formated.
(if length(Hours1) < 2 then '0') + Hours1 + ":" +
["0",""][length(Minutes1)] + Minutes1 + ":" +
["0",""][length(Seconds1)] + Seconds1
)
-----------------------------------------------------------

With the above formula, if the Sum ({ApplicationAbandon.CallsAnswered}, {ApplicationAbandon.Time}) = 0

Then the field displays nothing i.e. it blank, however I want it to display String "00:00:00"



PLease advice.

Thanks
 
Try:

If Sum ({ApplicationAbandon.CallsAnswered}, {ApplicationAbandon.Time}) = 0 then
"00:00:00" else

//Display the time formated.
(if length(Hours1) < 2 then '0') + Hours1 + ":" +
["0",""][length(Minutes1)] + Minutes1 + ":" +
["0",""][length(Seconds1)] + Seconds1
)

MrBill
 
hi
just change the last part to

With the above formula, if the Sum ({ApplicationAbandon.CallsAnswered}, {ApplicationAbandon.Time}) = 0
then
"00:00:00"
else
what you want to display





Then the field displays nothing i.e. it blank, however I want it to display String "00:00:00"


pgtek
 
I changed the formula to the following:

It still shows blank
-------------------------------------------------
WhilePrintingRecords;
StringVar Hours1;
StringVar Minutes1;
StringVar Seconds1;
NumberVar avgansdelayday := 0;

If Sum ({ApplicationAbandon.CallsAnswered}, {ApplicationAbandon.Time}) = 0 then
avgansdelayday := Sum ({iSkillsetStat.CallsAnsweredDelay}, {ApplicationAbandon.Time})
Else
avgansdelayday:=Sum ({iSkillsetStat.CallsAnsweredDelay}, {ApplicationAbandon.Time}) /Sum ({ApplicationAbandon.CallsAnswered}, {ApplicationAbandon.Time});

avgansdelayday:=Round( avgansdelayday);

If Sum ({ApplicationAbandon.CallsAnswered}, {ApplicationAbandon.Time}) = 0 then
"00:00:00"

Else
(
Hours1:=ToText(Truncate(avgansdelayday/3600),0);
Minutes1:=ToText(Truncate(Remainder(avgansdelayday,3600)/60),0);
Seconds1:=ToText(Remainder(Remainder(avgansdelayday,3600),60),0);

//Display the time formated.
(if length(Hours1) < 2 then '0') + Hours1 + ":" +
["0",""][length(Minutes1)] + Minutes1 + ":" +
["0",""][length(Seconds1)] + Seconds1
)
 
Please advice, any help will be appretiated!

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top