Interactive Crosstabs API reference
This section provides an alphabetic listing of the Interactive Crosstabs API classes.
The examples in this section consist of JavaScript functions usable by a typical web page. These examples use a sample report document called reportfile.rptdocument. The sample report document contains a cross tab that has been bookmarked within BIRT Designer Professional with the value of Sample Revenue. Use any equivalent file of that design. Place the Interactive Crosstabs viewer in the acviewer container. The acviewer container is a <div> tag in the HTML page with the following code:
<DIV ID="acviewer" STYLE="border-width: 1px; border-style: solid;display:none;"></DIV>
The JavaScript setup for the examples includes the initialization of the Data Analytics module and the setup of variables for use by the examples, as shown in the following code:
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
<!-- Load the xtabAnalyzer viewer component-->
actuate.initialize("../../", null, null, null, run);
var content;
var crosstab;
var viewer;
var container;
function run( ){
container = document.getElementById("acviewer");
viewer = new actuate.XTabAnalyzer(container);
viewer.setXTabBookmark("Sample Revenue");
viewer.submit( );
content = viewer.getCurrentPageContent( );
crosstab = content.getCrosstabByBookmark( );
<!-- JavaScript application functions -->
<!-- Other HTML code -->
The viewer variable points to the XTabAnalyzer object. The content variable points to the data within the web page. The crosstab variable points to the cross tab. These variables are used throughout the examples as needed.
Place example functions in the area marked "JavaScript application functions". The section marked "Other HTML code" contains <div> and other tags necessary for the web page.
Call the examples as any other JavaScript function. For example, the following HTML code creates a button with the label "Job 1" on it. When a user clicks that button, the page runs the JavaScript function Job1.
<INPUT TYPE="button" CLASS="btn" VALUE="Job 1" ONCLICK="Job1( );">