Below are some examples of interactive charts generated by InetSoft's charting engine. And following is documentation on using InetSoft's JavaScript-like API for programmatically generating charts. Alternatively use InetSoft's drag-and-drop chart designer.

Geographic Business Intelligence screenshot
Geographic Business Intelligence screenshot
Geographic Business Intelligence screenshot
 

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:

  • onLoad script is executed every time a report is processed.
  • onLoad script is executed after report parameter prompting.
  • The typical usages of the onLoad handler are the following:

  • Declaring report-level variables. For example, to keep a subtotal on each page, declare the 'subtotal' variable in the onLoad script and then update it using onPageBreak Handler script.
  • Initializing the report based on user input parameters. For example, onLoad script can set chart styles, report headers, element visibility, etc. The onLoad handler has access to the 'parameter' array that contains all report parameter values. For example, to hide a chart if a parameter is false:
  •  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 demo icon
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)


Previous: Setting the onClick Range