How Do I Implement Page-Based Calculations? (Magic xpa 4.x)
Sometimes you may need to have totals or other calculations done on a per-page basis. For instance, you might want to have the “total cost for this page” or increment the page number. However, for GUI reports, it is very difficult to manually figure out when a page is about to print, because the number of lines that print on a page can vary. So Magic xpa provides you with two internal events: Page Header and Page Footer, which allow you to do operations just before the Page Header or Page Footer print.
Note that you do not need to use these events to actually output the page header or footer, because these can be printed automatically.
How Do I Define Aggregates per Break Level?
How Do I Define Page Header and Footer Information?
How Do I Define a Global Page Header or Footer?
The Online and Rich Client Samples projects (program RP09 and RRP09)