The OnPageBreak Event Handler
A special variable, 'event', is available in the onPageBreak handler. This object contains information about what is on the current page. It has the following properties:
Table 3. OnPageBreak Event Handler Properties
Property |
Description |
elementID |
The ID of the last element on the current page. |
region |
A rectangle containing the last table region on the page: region.x is the left-most column number, region.y is the top row number, region.width is the number of columns, region.height is the number of rows. This property is only defined if the last element on the page is a table element. |
firstElementID |
The ID of the first element on the current page. |
firstRegion |
A rectangle containing the first table region on the page. This property is only defined if the first element is a table element. |
lastPage |
True if this is the last page of the report. |
rewound |
True if the last band on the page has been rewound. |
pageIndex |
The current page index (first page = 0) |
The following onPageBreak script displays a Text element (in the header) that says “continued ” if the current page is a continuation of a table from the previous page. The Text element has ID of “continuteLabel”.
if(event.elementID == 'Table1' && event.region.y > 1) {
continueLabel.visible = true;
}
else {
continueLabel.visible = false;
}
See Also
SI.30, PageBreak Event Object, for more detail on handler properties.
| << 5.4 onPageBreak Handler | © 1996-2013 InetSoft Technology Corporation (v11.5) | The rewound property >> |