|
Previous Top Next |
Prototype: | None |
This is the work horse method of the class. You call this method every time that you want the metafiles to be update. Note that when you call this method the total page counter is reset so the next page will be the first in a new total.
For example if you are printing 3 invoices. The first one is 2 pages the second is 1 page and the last one is 4 pages. On the first invoice the pages would be "page 1 of 2" and "page 2 of 2" On the second one it would be "page 1 of 1" The last invoice would have "page 1 of 4", "page 2 of 4", "page 3 of 4" and "page 4 of 4" To accomplish this you simply call SetPageOfPages after the pagebreak for the last page of the invoice has happened.
Note that if you call the method multiple times while the same page is printing, it will not attempt to update anything that has been updated already. This saves a lot of time since the class keeps track of the pages that have been updated with the correct page numbering and doesn't touch them again.
Example:
! Print pages with different total pages. Separated by the product SKU.
If PRO:ProductSKU[1] > 'F'
If PRO:ProductSKU[1] <> Clip(Loc:LastProduct)
Print(RPT:PageBreakDetail)
ITPOP.SetPageOfPages ! Call SetPageOfPages after each Print statement to ensure it updates the pages
Loc:LastProduct = PRO:ProductSKU[1]
End
End
See also:
Init
GetSearchString
SetSearchString