EaxMdService.openDocument

Syntax

openDocument(key: Number, callback: PP.Delegate||function, params);

Parameters

key. Key of the express report document to be opened.

callback. Callback function to be called after opening.

params. Parameters with which the object opens.

Description

The openDocument method opens an express report document in the view mode.

Comments

The method returns an object of the PP.Exp.EaxDocument type.

Example

Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). Open the express report with the 109 key, and handle the respective event:

// Get a servcie used to work with express report
var eaxMdService = expressBox.getService();
// Handle the EaxDocumentOpened event 
eaxMdService.EaxDocumentOpened.add(function (sender, args) {
    // Get key of the current express report document
    console.log("Key of the current express report document:  " + expressBox.getSource().getKey());
    console.log("Key of opened express report document: " + args.Document.getKey());    
});
// Open express report document with the 109 key in the view mode
eaxMdService.openDocument(109);

After executing the example the express report with the 109 key opens in the view mode. This fires the EaxDocumentOpened event, which displays key of the current and opened express report documents to the browser console:

Key of the current express report document:  108
Key of the opened express report document: 109

See also:

EaxMdService