Interactive scripting sample 1
The interactive viewer menu shown in Figure 5‑4 shows the following scripts changing interactive features:
*A script removes the user option to enable interactivity.
*A script removes the user option to export report content and data.
*A script enables interactivity when the BIRT design is viewed.
Figure 5‑4 Custom interactive viewer menu
The script written to change the toolbar menu appears in Listing 5‑1.
Listing 5‑1 Removing edit report and export options
// Get the Viewer's current UI Options
var uiOptions = this.getViewer().getUIOptions();
// Remove ability for user to export, extract,
// and change interactivity options
// Set the modified UI Options back into the Viewer
// If Interactivity is not enabled, enable it
if (!this.getViewer().isInteractive())