6 Replies Latest reply on Mar 17, 2011 7:42 PM by KStuart2

    Formcalc totals across pages

    KStuart2 Level 1

      Using Livecycle ES 8.2 I have a table that takes up two pages. Originally when it was one page my formcalcs worked properly. Now that it is two pages, my total line is on the second page (along with a few of the other rows). Is there a way for formcalc to total columns across fixed pages. Thank you for any suggestions you may have.

       

       

        • 1. Re: Formcalc totals across pages
          pguerett Level 6

          Is this a dynamic table (i.e. you can add rows on the fly) or is it a fixed table (already is two pages when it loads). What is the command that you use to do the total?

           

          Paul

          • 2. Re: Formcalc totals across pages
            KStuart2 Level 1

            The table is a fixed table. The command used to do the column total is a simple 'sum' command:

            Sum(OH_1, OH_2, OH_3, OH_4)

            My actual sum line goes through 'OH_22'

            The first 17 rows are on page 1 and the balance are on page 2.

            The table also 'sum' totals each row, then, on the total line on page 2 I also have another 'sum' command that totals all the 'totaled up' columns. But now that the table is on 2 pages, only the row 'sum' calculations work, the column total is totaling across to page 2.

            • 3. Re: Formcalc totals across pages
              pguerett Level 6

              Then you will need to include the page reference for the objects in teh sum calc. I assume the total is on page 2 so the command woudl look like:

               

              Sum(page1.OH_1, page1.OH_2, page1.OH_3, page1.OH_4 ......page2.OH18,page2.OH19 ......)

               

              Paul

              • 4. Re: Formcalc totals across pages
                KStuart2 Level 1

                Thank you. Does it matter what page the table is actually on in my file? For instance the table appears on pages 10 and 11 of the scripted file. Should the sum line reflect (page10.OH_1...,page11.OH18) or should I actually use 'page 1 and page 2'.

                 

                Thank you in advance for your expertise. You have been most helpful.

                • 5. Re: Formcalc totals across pages
                  pguerett Level 6

                  You need to follow the hierarchy of your design. I assume that your code is on an event in the total field .....so if you look at your hierarchy view then you will need to indicate how to get to those fields if they are not in the same container (just like accessing a file in DOS). You woudl be safer to start from the top and work your way down through the hierarchy to get to your desired field (i.e form1.Page1.fieldname.....) or

                   

                  put your cursor in th eeditor where you want the field reference to appear. Hold down the ctrl key and move your mouse to the field you want to reference (the cursor will change to a V when you are on a field). Now click the mouse and the reference relative to the current scrip object location will be written in the script editor. Repeat for each field.

                   

                  Paul

                  • 6. Re: Formcalc totals across pages
                    KStuart2 Level 1

                    Thank you for all your help! Your answer solved my problem. This worked perfectly.