Hello, I am having a problem using calculations in an Acrobat form, using ver 8.1.2 pro, in Windows XP. I am rather new to the calculations feature of Adobe Acrobat, but can see it is a powerful tool.
I have a form with two columns the first column is the Odometer Reading column and the second is the Miles Traveled. I need the user to submit the odometer reading when they stop their vehicle and I need the second column to calculate the amount of miles traveled each time they update the entry below. The form has 18 rows in each of the columns.
I figured out that this should be a simple text field and should perform a simple calculation (field2-field1), in the Odometer Reading column. This part is no problem and it works great. (In my situation in the second Miles Traveled field the simple calcuation is (or2-or1), in the third Miles Traveled field, the simple calcuation is (or3-or2) and this pattern is followed all the way down the column.)
What I have discovered is the problem is that as odometer entries are added to the column, the calculation is performed and the results are added in the appropriate Miles Traveled column, as desired, but in addition, another negative number is added to the Miles Traveled field just below. This number seems to be a negative of the Odometer Reading field entry, but it is added to the Miles Traveled column. This in itself is not a big issue, but the number seems to stay until the next odometer reading is added and then it performs the calculation and adds this negative number to the field below again. If the entire form is always completed, it seems when the form runs out the fields it works fine and this negative result does not appear. The problem is, this form will have variable entries, one time there may only be two odometer reading entered and other times there might be 18 odometer readings entered. This negative number prints if the form is printed and cannot be deleted manually.
Is there a way to keep this additional negative number from appearing on the form in the Miles Traveled column? This is especially important if no further entries will be made on the form. Is it possible to have a field for this number to appear which in invisible, but still have the desired results displayed in the proper position?
Thanks AdobeUser
You will need to write a custom calculation script to to only perform the calculation for a row if the odometer reading for the row has a value.
The following code can be used in each Miles Traveled field and you only need to change the 'Index' value to the row number.
George Kaiser