One way I thought of, not sure if it's possible though, is to create two hidden fields for each row, lined up into two columns (labeled in my head as "checked" and "unchecked". If the box was checked, the subtotal for that row would be copied into the "checked" hidden column, and if unchecked, it would end up in the unchecked column. This would essentially presort the subtotals, so that the two fields at the bottom would merely have to add up their respective columns.
I'm not sure if this is possible, and it certainly isn't as elegant, but I believe the scripting would be much simpler.
I've been working on it and am closer I believe.
I'm going the route with two hidden columns. In one column, it will copy over the subtotals that are checked. In the other, the sub-totals that are unchecked. The boxes at the bottom will merely total the two columns. I have developed the following script, but can't get it to work (The subtotal field is named "Actual Length in Str feet mRow1" and the hidden field is "Text1").
If (Check Box1.value == "1")
Text1.value = this.getField("Actual Length in Str feet mRow1").value;
If I could get this to work, I could modify it dependent of which column I was working in. What are the values of a checked and unchecked check box?
Unchecked check boxes and radio buttons have a value of "Off". When a specific field is selected, then the value is the value in "Export Value" for check boxes and "Button Value" for radio buttons.