This article is the first part in a multi-part series of articles which will explore the possibilities and power of the onContentUpdate event.<br />
<br />
BI Systems are much more than just 1 or 2 reports. The Actuate BIRT iServer, is a great platform to manage and deploy dozens, hundreds or even thousands of reports to a community of users in a secured fashion. With the power of the Interactive Viewer, BIRT reports come alive, empowering users to understand the report content as they need it to be.<br />
<br />
With great power, also comes a lack of control. There are many situations where a single viewer, doesn't fit all use cases. There may be reports, where Interactivity needs to always be turned on, or other situations, where certain interactive functions need to be disabled. With Actuate 10, the JavaScript API (Web 2.0 API) was launched, allowing developers to create custom viewers for specific reports, with specific functionality within the viewer itself. This allows for great control of the user experience, but came at the expense of extra developer effort to create these viewers. Although not diffcult to do, it was still a required task. Launching the users into these custom viewers, also required custom launching pads, as the Actuate Information Console would always launch users into the same, out of the box viewer.<br />
<br />
ActuateOne, powered by the Actuate BIRT iServer 11, introduces a new event to the BIRT report design, which amongts other things allows the report developer to tailor the out of the box Interactive Viewer, for that specifc report. This new report level event is called
onContentUpdate, and is not your typical report event. The
onContentUpdate event, is a client side, JavaScript based event with context on the current Actuate Viewer. The key here, is that the event is client side, meaning it executes within the browser itself. The event is executed after any update of the content on the screen, including the rendering of the first page. Since the event also has context of the Actuate viewer, you can also customize the viewer through JSAPI to further refine the user experience.<br />
<br />
The following line of code will return a handle to the JSAPI Viewer object that the report is currently being rendered within.
this.getViewer()
<br />
When combined with some of the functionality of JSAPI you can do some simple things, such as check to see if interactivity is turned on, and if not, turn it on. In the following example, the code will remove the ability for the user to select the Interactivity mode, as well as remove the ability for the user to print, export, or extract data from the report.
// Get the Viewer's current UI Options
var uiOptions = this.getViewer().getUIOptions();
// Remove ability for user to export, extract, print, and change interactivity options
uiOptions.enableExportReport(false);
uiOptions.enableDataExtraction(false);
uiOptions.enablePrint(false);
uiOptions.enableEditReport(false);
// Set the modified UI Options back into the Viewer
this.getViewer().setUIOptions(uiOptions);
// If Interactivity is not enabled, enable it
if (!this.getViewer().isInteractive())
this.getViewer().enableIV();
<br />
See the attached report design for the sample at work.<br />
<br />
Stay tuned for future articles in this series which will showcase increased functionality and power of
onContentUpdate, and taking interactivity to the next level.<br />
<br />
Part 2 - Custom Interactions<br />
Part 3 - Interactivity and Beyond<br />
Part 4 - The Smart(er) Report