how to set calculation precision ?

M

Marius

hello,
does anyone know how to set calculation precision when calculating fields ?

This is my scenario:
i'm using Infopath 2003 and have form with repeating table and 3 fields in
it :
[amount] [exch_rate] [amount_ltl].
all fields are decimal double and it is set that only 2 numbers should be
diplayed after comma (decimal places).
formula i'm using is this : [amount_ltl] = [amount] * [exch_rate].

Below repeating table i have field [total_ltl] which sums up all
[amount_ltl] fields in repeating table. This field is also decimal double
with 2 decimal places

I have calculation made incorrectly in [total_ltl] field: it is summing not
rounded (with 2 decimal places) numbers in [amount_ltl], but with all digits,
so it incorrectly displays last digit.
EXAMPLE :
[amount] [exch_rate] [amount_ltl]
99.60 1.0401 103.59
94.80 1.0401 98.60
109.60 1.0401 113.99
6.88 1 6.88

[total_ltl] diplays 323.07 (SHOULD BE 323.06)
how to solve this ?
 
M

Marius

thanks this helped !!

S.Y.M. Wong-A-Ton said:
Try the technique described in this post:
http://blogs.msdn.com/infopath/arch...lculating-the-result-of-2-or-more-fields.aspx
---
S.Y.M. Wong-A-Ton


Marius said:
hello,
does anyone know how to set calculation precision when calculating fields ?

This is my scenario:
i'm using Infopath 2003 and have form with repeating table and 3 fields in
it :
[amount] [exch_rate] [amount_ltl].
all fields are decimal double and it is set that only 2 numbers should be
diplayed after comma (decimal places).
formula i'm using is this : [amount_ltl] = [amount] * [exch_rate].

Below repeating table i have field [total_ltl] which sums up all
[amount_ltl] fields in repeating table. This field is also decimal double
with 2 decimal places

I have calculation made incorrectly in [total_ltl] field: it is summing not
rounded (with 2 decimal places) numbers in [amount_ltl], but with all digits,
so it incorrectly displays last digit.
EXAMPLE :
[amount] [exch_rate] [amount_ltl]
99.60 1.0401 103.59
94.80 1.0401 98.60
109.60 1.0401 113.99
6.88 1 6.88

[total_ltl] diplays 323.07 (SHOULD BE 323.06)
how to solve this ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top