Tutorial Adobe Scripting (3): Calculation of subtotals and carry over per page in SAP Adobe Forms

If an SAP invoice has several pages, the sum of all the positions of the current page at the end of a page should be displayed. It is the classical demand for a representation of the carry over on a bill. Example We have an invoice with 3 pages.