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!

Numeric Overflow Error

Status
Not open for further replies.

haneen97

Programmer
Dec 10, 2002
280
US
Hi,

I have this formula to format a total field:

Time (Int ({@GRP_ELAPSED_HOURS}/60),({@GRP_ELAPSED_HOURS}-(Int ({@GRP_ELAPSED_HOURS}/60)*60)),0)

It is causing a "numeric overflow" error.

Please help!
Thanks

Mo
 
What is the formula {@GRP_ELAPSED_HOURS} that you are using as a source?

 
This is it:
Maximum ({ENDO_INOUT_STATS.ELAPSED_TIME}, {ENDO_INOUT_STATS.SCHED_DATE})/60

It is accumulating the number of hours for each detail line.

Mo
 
The error is because the Integer command INT is not returning a whole number. Probably caused by a () problem.

Try deconstructing the formula section by section to find the bug.

You may need to paste (Maximum ({ENDO_INOUT_STATS.ELAPSED_TIME}, {ENDO_INOUT_STATS.SCHED_DATE})/60) into the formula where {@GRP_ELAPSED_HOURS} exists in my formula.
 
Hi

I used the code below from the other link:

Val(ToText(Truncate({table.minutes}/60),0) + "." + ToText({table.hours} MOD 60))

It worked but it has a small bug that I can't fix; if the total number of hours is less than 60, it displays the number with a decimal point to the left only.

total minutes Total hours
-------------- --------------
30 .30 as opposed to .5.


Mo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top