i am getting 'NaN' error at the infopath footer field which is performing addition to all rows' values.
1. it is repeating table with all fields off Decimal(double) type. total 13 fields. from January to December and last total field...
2. for horizontal addition, i am using rules as well as default value formula to the total field(i.e fx= (jan+feb+mar and so on))...
3. for vertical addition, i am using default value formula(i.e fx= sum(jan))...
----------------------------------------------------
things i tried
1. using round function in formulas and rules(e.g round(field1 *100)* 0.01)...
2. try to change datatype of values coming from db(from float to decimal)...
3. try to remove number formatting...
4. check "refresh value when formula is recalculated"...
5. make textbox's postback "Always"...
------------------------------------------------------
findings:
1. when i see "1" in horizontal total field, actually it is "0.999999999970896" in xml
2. when i try to substract 1 from that "1"(actually from "0.999999999970896" ) i get "0" in
horizontal total field and "NaN" in its Vertical field. but when i see the xml value of
that resulting "0", i see some hexadecimal value behind there in xml.
i think NaN word is coming because i get hexadecimal value in horizontal total field.
thats why sum(total) function not works there and i get NaN at bottom.
how to avoid hexadecimal value result in floating point calculations in infopath???