3 Replies Latest reply: Jul 14, 2014 2:52 PM by user9976634 RSS

    How to code page numbering that does not begin on Page 1...

    1006415

      Hi,

       

      I'm looking for the most efficient way (other than hardcoding the page numbers on the pages) to code page numbering from say, the third sheet/page, instead of the first sheet/page.

       

      Obviously this needs to happen in GENDATA, because the FORMPAGENUM and FORMPAGENUM OF are system functions that occur in GENPRINT and seemingly can't be manipulated.

       

      Example document would be one with a cover page, then an index or table of contents page and then the document starting page from which we want to print the page numbering "- 1 -", "- 2 '_, etc...

       

      Thanks!

        • 1. Re: How to code page numbering that does not begin on Page 1...
          user9976634

          If your cover page and index are on separate forms, then in the Forms List manager (the GRP file), where you establish your form triggers, you can specify that form to have the "Exclude from page count" option.

           

          Alternatively, you could certainly create your own fields on your forms to have whatever value you want to calculate. Using the DAL field rule would be one possible way of assigning such a value.

          • 2. Re: How to code page numbering that does not begin on Page 1...
            1006415

            Hi, unfortunately the cover page and index pages are two sections of the full form.

             

            I have a footer section that is Copy On Overflow, starting on the third page, and was hoping I could embed logic within the footer to increment the page number for each instance.

             

            Any suggestions for a DAL shortcut that could be coded within the overflowing footer section?

            • 3. Re: How to code page numbering that does not begin on Page 1...
              user9976634

              If you plan to rely upon your footer as container, then you could simply add a field to it and show the value. Since you mentioned Gendata, you would use a DAL field rule to return a running count to the field. DAL variables "live" throughout your transaction, so your script could be as simple as:

               

              #PCOUNT += 1

              RETURN(#PCOUNT)

               

              The first time the call is made, the #PCOUNT will not yet exist. Upon creation, it will be given an initial zero value. During each subsequent call, it will have the previous value, which you will increment and return.

               

              If you needed a more interactive solution, there may be a way to do this with the "print-time" field generation. However, that support didn't start until around 11.4? and I don't know what your version is. That method would still utilize DAL, but would require some additional script logic.