OK. I'm a slight noob to the reporting thing. I keep getting an error in my formula with anything I put after my IF statement. Here is my code:
numberVar AvgTime;
numberVar RemainingSeconds;
numberVar Days;
numberVar Hours;
numberVar Minutes;
numberVar Seconds;
numberVar tempTime;
AvgTime := ((Sum ({@WorkHoursFormula}, {TASKS.TYPE})) / (Count ({@DisplayTime}, {TASKS.TYPE})));
if (AvgTime >= 8) then
// Dividing WorkHours by 8 hours in a work day
(Days := truncate(AvgTime / 8);
//Get the remainder from the days
tempTime := (AvgTime / 8) - Days;
//Conver to seconds by multiplying by # seconds in work day
RemainingSeconds := tempTime * 28800
else
(RemainingSeconds := AvgTime * 3600
---ERROR HIGHLIGHT STARTS---
RemainingSeconds := (RemainingSeconds - (Hours * 3600));
Minutes := truncate(RemainingSeconds / 60);
Seconds := truncate(RemainingSeconds - (Minutes * 60));
totext(Days,"00")+":" + totext(Hours,"00") + ":" + totext(Minutes,"00") + ":" + totext(Seconds,"00")
------------------------------------------------------
OK. so I get the error that highlights everything after the end of my else statement that says "The remaining text does not appear to be part of the formula".
Please help
numberVar AvgTime;
numberVar RemainingSeconds;
numberVar Days;
numberVar Hours;
numberVar Minutes;
numberVar Seconds;
numberVar tempTime;
AvgTime := ((Sum ({@WorkHoursFormula}, {TASKS.TYPE})) / (Count ({@DisplayTime}, {TASKS.TYPE})));
if (AvgTime >= 8) then
// Dividing WorkHours by 8 hours in a work day
(Days := truncate(AvgTime / 8);
//Get the remainder from the days
tempTime := (AvgTime / 8) - Days;
//Conver to seconds by multiplying by # seconds in work day
RemainingSeconds := tempTime * 28800
else
(RemainingSeconds := AvgTime * 3600
---ERROR HIGHLIGHT STARTS---
RemainingSeconds := (RemainingSeconds - (Hours * 3600));
Minutes := truncate(RemainingSeconds / 60);
Seconds := truncate(RemainingSeconds - (Minutes * 60));
totext(Days,"00")+":" + totext(Hours,"00") + ":" + totext(Minutes,"00") + ":" + totext(Seconds,"00")
------------------------------------------------------
OK. so I get the error that highlights everything after the end of my else statement that says "The remaining text does not appear to be part of the formula".
Please help