Documentation
onLoad Handler
The onLoad handler is similar to the onInit handler, and is also executed at the beginning of report generation. It differs from onInit in two important ways:
if(!parameter['showChart']) { Chart1.visible = false; }
Dynamically running queries. An element's 'query' property can only be set in the onLoad handler, not in element-level script. See Binding Queries for details.
Modifying binding characteristics (column visibility, grouping and summarization, etc.) using the element's bindingInfo attributes.
Modifying multiple elements from a central location.
#1 Ranking: Read how InetSoft was rated #1 for user adoption in G2's user survey-based index |
|
Read More |
onPageBreak Handler
The onPageBreak handler is executed at the end of every page, after all elements on the page have been processed (except for headers and footers). Because the onPageBreak handler follows body-element processing, it should not modify the body contents on the current page. It can, however, modify contents in the header and footer of the current page.
The main use of onPageBreak is to calculate page-level summarization. It is also useful in cases where you wish to display page numbering in the body of the report. You can use the onPageBreak handler to increment a “page number” variable, and then reference that variable in the desired elements.
|
View a 2-minute demonstration of InetSoft's easy, agile, and robust BI software. |
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)
|