2 Replies Latest reply on Jul 27, 2016 12:29 PM by karis52413318

    Calculate Grand Total on Summary Sheet from Subtotals on Spawned pages

    karis52413318

      Hoping for some help. Completely new to all this-I've gotten this far by searching the forums. Working on a form - it has a summary page first and then detailed reports after. The detailed report is a spawned page from a hidden template. How do I calculate the total from each spawned page onto the summary page?

        • 1. Re: Calculate Grand Total on Summary Sheet from Subtotals on Spawned pages
          gkaiseril MVP & Adobe Community Professional

          Are all the spawned pages created from the same template?

           

          Was the first visible page of the PDF form spawned from the template and then had all the fields with "P1." prefix renamed to "P0."?

           

          If both are true, I would compute the total field sums by using a custom JavaScript calculation to loop through eah page by accessing the subtotal field which using a loop to loop through each page number from 0 to numPages - 1. You can use a variable and compute the subtotal name since the name of the subtotal field field would be something like "P" + [loop control] +". " + "[tempaletName" + "." + "[subtotal field name]". I would add code to trap the not found error when executing "this.getField([field name variable]).value;".

           

          I have assumed you have figured out how write the custom JavaScript to compute the subtotal on each page.

          • 2. Re: Calculate Grand Total on Summary Sheet from Subtotals on Spawned pages
            karis52413318 Level 1

            I'm completely over my head in this. I have never worked with this stuff before. I appreciate you trying to help though.