Skip to main content
Participant
July 27, 2016
Question

Calculate Grand Total on Summary Sheet from Subtotals on Spawned pages

  • July 27, 2016
  • 2 replies
  • 597 views

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?

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Inspiring
July 27, 2016

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.

Participant
July 27, 2016

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