OLE Automation Controller within JavaScript (JOOLE)

Interactive Reporting Studio is an OLE Automation controller. On Windows systems, Interactive Reporting Studio can control external applications (that is, programmable ActiveX objects) that are OLE Automation servers. By making OLE Automation calls, Interactive Reporting Studio can access functionality exposed by other OLE Automation Servers. Examples of OLE Automation Servers, such as Excel and Visual Basic.

  To define a JOOLE object reference, use var <variableName> = new JOOLEObject(<ProgId>).

<ProgID> is a string that indicates the object to be referenced. Interactive Reporting Studio or Interactive Reporting Web Client passes the string as a reference to the object; for example, Excel.Application. <ProgID> is stored in the registry and contains a string defined as Project.ClassName.

JOOLE works on Windows systems only.


It is recommended that JOOLE calls stored in plug-in scripts be implemented on Internet Explorer.


You cannot embed OLE objects inside Interactive Reporting documents. Likewise, Interactive Reporting Studio and Interactive Reporting Web Client are not OLE servers that produce OLE objects that you can embed in OLE containers.

Example—Invoking an Excel worksheet from a command button created in a dashboard section and writing “Hello World” to rows of a column.

Excel = new JOOLEObject("Excel.Application"); 
Excel.Visible = true;
Excel.Sheets.Item(1).Cells.Item(2).Item(2).Value = "Hello";
Excel.Sheets.Item(1).Cells.Item(2).Item(3).Value = "World";

Example—Invoking Outlook from a command button created in a dashboard section and writing a message in the body of the email message:

var olApp = new JOOLEObject("Outlook.Application") 
var olNote = olApp.CreateItem(0) 
olNote.To = "yourname@Hyperion.com"
olNote.Subject = "JOOLEObject mail Example"
olNote.Body = "This is an automatically generated note."
//olNote.Attachments.Add (filepath)

Example—Using JOOLE to start Outlook on Windows XP:

var obj = Application.Shell("c:\\program Files\\outlook express\\msimn.exe") 

Example—Invoking, displaying, and printing a Word document (Hello.doc) from a command button created in a dashboard section:

/Create Word Object 
word = new JOOLEObject("Word.Application");
// Make is Visible 
word.Visible = true;
//Open the desired file 
// Set Options 
word.Options.PrintBackground = false;
//Start Printing 

Example—Creating and writing text to a text file from an Interactive Reporting document file, appending the characters “_trace” to the document name and replacing the document extension with .TXT:

var oleApp = new JOOLEObject("Scripting.FileSystemObject")
var myPath=ActiveDocument.Path.slice(0,-4)+"_trace.txt"
var traceDoc=oleApp.CreateTextFile(myPath)
traceDoc.WriteLine("hello from Hyperion")

For example if the Interactive Reporting document is named DashboardText.bqy, Interactive Reporting Studio or Interactive Reporting Web Client creates the text file named DashboardText_trace.txt.