In our LiveCycle Designer form design we have a repeating table with a Total field. The total is rounding some numbers up and not rounding other numbers. For example:
58.81 x 42.5 = 2499.43 which is correct.
60.49 x 5.5 = 332.69 which is incorrect - it should be 332.70.
this.rawValue = OTRate.rawValue * Hours.rawValue
Any ideas on what is going on here???
There is a rounding function in Livecycle, but only for FormCalc.
However, even it does some strange things. Your calculation comes to 332.695 but rounding to 2 digits gives the answer 332.69, not 332.70
Apparently Adobe dont understand how to Round.
Evaluates a given numeric value or expression and returns a number rounded to a given number of decimal places.
Round(n1 [, n2])
A numeric value or expression to be evaluated.
The number of decimal places with which to evaluate n1 to a maximum of 12.
If you do not include a value for n2, or if n2 is invalid, the function assumes the number of decimal places is 0.
The following expressions are examples of using the Round function:
|Round(FV(400, 0.10/12, 30*12), 2)|
904195.17. This takes the value evaluated using the FV function and rounds it to two decimal places.
See also FV.
Rounds off the value of Total_Price to two decimal places.
I'm confused. If using the field names I have above (not static numbers as in your example), would this be:
(OT.rawValue * Hours.rawValue).toFixed(2)
Because that doesn't work under the calculate function of LiveCycle Designer.
(OT.rawValue * Hours.rawValue + 0.001).toFixed(2)
I guess it has something to do with the rounding of a decimal ending in 5.