Tutorial 6: Implementing the JSAPI in a web page to display a dashboard
This tutorial provides step-by-step instructions for authoring a web page to display a BIRT dashboard.
1 Using a code editor, open or create a JSAPITemplate.html file that contains the essential components for any web page that implements the JSAPI.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>JSAPI Template</title>
<body onload="init( )">
<div id="sample">
<script type="text/javascript" language="JavaScript" src=""></script>
<script type="text/javascript" language="JavaScript">
<!-- Insert code here -->
2 Navigate to the following line:
<title>JSAPI Template</title>
In title, change:
JSAPI Template
Dashboard Display Page
3 Navigate to the following line:
<div id="sample">
In id, change:
4 Navigate to the empty line after the following line:
<script type="text/javascript" language="JavaScript">
5 Add the following code:
function init( ){
var reqOps = new actuate.RequestOptions( );
actuate.initialize("", reqOps, "administrator", "", displayDashboard);
function displayDashboard( ){
var mydashboard = new actuate.Dashboard("dashboard");
6 Save the file as dashboarddisplay.html.
7 In Internet Explorer, open dashboarddisplay.html.
If you receive a security warning that Internet Explorer has restricted this page from running scripts or ActiveX controls that could access your computer, right-click on the message and select Allow Blocked Content.
If you receive a scripting error, choose OK. This error is generated by the Documents.DASHBOARD file, not dashboarddisplay.html.
If the dashboard does not finish loading, in Internet Explorer, choose ToolsInternet Options. Select the Privacy tab, then choose Advanced. Select “Override automatic cookie handling.” Choose Apply. Refresh the browser.