<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Calculation Bug with Addition?</title><link>https://www.infopathdev.com:443/forums/thread/18165.aspx</link><pubDate>Thu, 27 Jul 2006 19:48:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18165</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18165.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=18165</wfw:commentRss><description>You can set a default value formula for each such field with the formula:&lt;br /&gt;    round(. * 100) div 100&lt;br /&gt;&lt;br /&gt;But this seems to have the peculiar side-effect of changing a blank value to 0.0 (assuming a single decimal place) instead of leaving it blank. This effefct however, might be okay for your situation.&lt;br /&gt;&lt;br /&gt;Good luck.</description></item><item><title>Re: Calculation Bug with Addition?</title><link>https://www.infopathdev.com:443/forums/thread/18164.aspx</link><pubDate>Thu, 27 Jul 2006 13:27:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18164</guid><dc:creator>mbenbow</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18164.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=18164</wfw:commentRss><description>Hey,&lt;br /&gt;&lt;br /&gt;That might work for a plain value or even a multiplication problem.  But I have found that if you are adding a series of fields, you have to perform the (round(Field1 * 10) / 10) + (round(field2 * 10) / 10) + (round(field3 * 10) / 10) in order to get the correct result for the user.&lt;br /&gt;&lt;br /&gt;The reason is this....if you set a field as a decimal with 1 decimal place, the user can actually type into the fields 1.856, 4.225 and 6.151  - but InfoPath will display the following to the user 1.9, 4.2 and 6.2 (the data file will actually hold the 1.856, 4.225 and 6.151 values).  To the user the 1.9 + 4.2 + 6.2 = 12.3; when mathematically the result is actually 12.232&lt;br /&gt;&lt;br /&gt;If you use the Round(value*10)/10 the result would be 12.2 and not 12.3&lt;br /&gt;&lt;br /&gt;Ensuring that all values that the user can enter into a field and have the it function correctly mathematically is a pain to say the least in InfoPath.  We have just rolled out 300+ forms in an enterprise environment and this is the biggest issue.&lt;br /&gt;&lt;br /&gt;Argh!!!!&lt;br /&gt;</description></item><item><title>Re: Calculation Bug with Addition?</title><link>https://www.infopathdev.com:443/forums/thread/18163.aspx</link><pubDate>Tue, 25 Jul 2006 23:43:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18163</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18163.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=18163</wfw:commentRss><description>Sounds like an issue. For a workaround, use the round() function:&lt;br /&gt;&lt;br /&gt;round(value*100)/100&lt;br /&gt;&lt;br /&gt;the 100 gives you two decimal places. For three, you would use 1000, and so on.</description></item><item><title>Calculation Bug with Addition?</title><link>https://www.infopathdev.com:443/forums/thread/18020.aspx</link><pubDate>Tue, 25 Jul 2006 21:25:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18020</guid><dc:creator>mbenbow</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18020.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=18020</wfw:commentRss><description>Hey,&lt;br /&gt;&lt;br /&gt;This has happened on a couple of forms and it took me a while to figure out the issue.&lt;br /&gt;&lt;br /&gt;At the top of the form is a field for the user to enter the amount of the check (decimal - 2 decimal places).  The form also has a repeating table that allows the user to enter the GL code and the amount to apply to the GL code(s).  A validation calculation field is used to show whether the check amount equals the sum of the GL code amounts.&lt;br /&gt;&lt;br /&gt;Here is the issue and I need to test further with other prime numbers for the cents.&lt;br /&gt;&lt;br /&gt;If the user enters 250.23 for the check amount and enters 3 GL codes with amount 1 = 50.20, amount 2 = 100.03 and amount 3 = 100.00, the validation calculation will report that the sum of (50.20 + 100.03 + 100) does not equal 250.23 check amount.&lt;br /&gt;&lt;br /&gt;All fields are set to decimal with 2 decimal places....but in determining where the error was being generated....the validation calculation is performing a rounding error and the sum of (50.20 + 100.03 + 100) in the field is actually 250.230000002 even though it displays 250.23&lt;br /&gt;&lt;br /&gt;I know how to get around this issue but it appears to be a bug because if I put the check amount at 250.48 and the 3 GL amounts at 50.44, 100.04 and 100 there is no rounding error.&lt;br /&gt;&lt;br /&gt;Anyone else experience this?&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Mary</description></item></channel></rss>