<?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>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Calculation bug in browser form but not in Infopath form</title><link>https://www.infopathdev.com:443/forums/thread/29020.aspx</link><pubDate>Thu, 29 May 2008 13:18:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29020</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29020.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=29020</wfw:commentRss><description>&lt;p&gt;This is interesting.&lt;/p&gt;
&lt;p&gt;To your reference to jscript, IPFS does not use any script and only managed code. so that might be a clue but still interesting it itterates through the repeating nodes differently.&lt;/p&gt;</description></item><item><title>Calculation bug in browser form but not in Infopath form</title><link>https://www.infopathdev.com:443/forums/thread/29007.aspx</link><pubDate>Wed, 28 May 2008 22:56:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29007</guid><dc:creator>saiyan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29007.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=29007</wfw:commentRss><description>Hi all.&lt;br /&gt;
&lt;br /&gt;
I have ran into a calculation problem that only happens if the form is displayed in a browser.&lt;br /&gt;
If the form is displayed by Infopath 2007 client, everything is okay.&lt;br /&gt;
&lt;br /&gt;
Below is a simplied version of the form I am working on.&lt;br /&gt;
&lt;br /&gt;
The form contains the following main data source:&lt;br /&gt;
&lt;font color="DarkBlue"&gt;&lt;pre&gt;
-myFields (root)
   -expenses (group)
      grandTotalCost (decimal)
      -expense (repeating group)
         category (string)
         totalCategoryCost (decimal)
         -advertising (group)
            totalCost (decimal)
            -advertisingDetail (repeating group)
                 lineDescription (string)
                 lineItemCost (decimal)
         -supplies (group)
            totalCost (decimal)
            -suppliesDetail (repeating group)
                 lineDescription (string)
                 lineItemCost (decimal)
&lt;/pre&gt;&lt;/font&gt;
Now suppose my form contains only one repeating table which binds to &amp;quot;expense&amp;quot; repeating section.&lt;br /&gt;
Each insertable line of the repeating table contains one textbox which binds to &amp;quot;category&amp;quot; and a second textbox which binds to &amp;quot;totalCategoryCost&amp;quot;.&lt;br /&gt;
And at the bottom of the repeating table, I have added a footer line containg another textbox which binds to &amp;quot;grandTotalCost&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;grandTotalCost&amp;quot; is a vertical summation and has the following formula: sum(totalCategoryCost)&lt;br /&gt;
&lt;br /&gt;
If you run this form and enter two lines in the repeating table as shown below, the value of &amp;quot;grandTotalCost&amp;quot; is correctly calculated.&lt;br /&gt;
&lt;font color="DarkBlue"&gt;&lt;pre&gt;
Category          Total Category Cost
-------------------------------------
Test 1                          $1.00
Test 2                          $2.00
-------------------------------------
Grand Total                     $3.00
&lt;/pre&gt;&lt;/font&gt;
So far so good.&lt;br /&gt;
This form also calculates &amp;quot;grandTotalcost&amp;quot; correctly when dispalyed as a browser form.&lt;br /&gt;
&lt;br /&gt;
The next thing I do is to add a repeating section control which binds to &amp;quot;expense&amp;quot;.&lt;br /&gt;
Within this repeating section control, I add another repeating table which binds to &amp;quot;advertising&amp;quot;.&lt;br /&gt;
Each insertable line of this new repeating table has two textboxes binding to &amp;quot;lineDescription&amp;quot; and &amp;quot;lineCost&amp;quot; of &amp;quot;advertising&amp;quot; respectively.&lt;br /&gt;
&lt;br /&gt;
Without going into detail of what I am planning to do with the extra repeating section and repeating table, let&amp;#39;s take a look at how the first repeating table calculates its grand totals.&lt;br /&gt;
&lt;br /&gt;
If you do a quick preview or force Sharepoint library to display the form via Infopath, you will see that vertical summation of the first repeating table still calculates correctly.&lt;br /&gt;
However, if the form is displayed in a browser the value of the vertical summation is now doubled as shown below:&lt;br /&gt;
&lt;font color="DarkBlue"&gt;&lt;pre&gt;
Category          Total Category Cost
-------------------------------------
Test 1                          $1.00
Test 2                          $2.00
-------------------------------------
Grand Total                     &lt;font color="Red"&gt;$6.00&lt;/font&gt;
&lt;/pre&gt;&lt;/font&gt;
If I repeat the above step and add antoher repeating section control and repeating table for &amp;quot;supplies&amp;quot;, the vertical summation will be tripled as shown below:&lt;br /&gt;
&lt;font color="DarkBlue"&gt;&lt;pre&gt;
Line Description       Line Item Cost
-------------------------------------
Test 1                          $1.00
Test 2                          $2.00
-------------------------------------
Total Category Cost             &lt;font color="Red"&gt;$9.00&lt;/font&gt;
&lt;/pre&gt;&lt;/font&gt;
In other words, for each additional repeating section and repeating table controls I add, the vertical summation calcuated in the first repeating table will increase by the correct amount.&lt;br /&gt;
&lt;br /&gt;
Once again.  This this problem only occurs when the form is display in a browser.&lt;br /&gt;
When the form is displayed by Infopath 2007, there is no calculation errors.&lt;br /&gt;
&lt;br /&gt;
So is this problem a bug in Office Form Server 2007?&lt;br /&gt;
&lt;br /&gt;
(I think the browser form relies on JavaScript to do calculation so perhaps Office Form Server did not create JavaScript with proper functionality when the form was activated).&lt;br /&gt;
&lt;br /&gt;
Or am I doing something wrong with repeating groups and repeating section/table controls?&lt;br /&gt;
&lt;br /&gt;
(May be I should not have repeating groups (e.g. &amp;quot;advertising&amp;quot;, &amp;quot;supplies&amp;quot;) inside another repeating group (e.g. &amp;quot;expense&amp;quot;)?&lt;br /&gt;
&lt;br /&gt;
FYI, here is the spec of our server hosting SharePoint and Form service:&lt;br /&gt;
Windows 2003 Standard Edition SP2&lt;br /&gt;
Windows SharePoint 3.0 service w/ SP1&lt;br /&gt;
Office Form Server 2007 w/ SP1&lt;br /&gt;
(We only have Office Form Server 2007 installed and not MOSS 2007).&lt;br /&gt;
&lt;br /&gt;
It would be greatly appreciated if anyone can provide some advice on what I can do.&lt;br /&gt;
&lt;br /&gt;
Thanks.</description></item></channel></rss>