EaxMdService.saveObject

Syntax

saveObject(report: PP.Exp.EaxDocument, callback);

Parameters

report. Express report document to be saved.

callback. Callback function.

Description

The saveObject method saves an express report and all its sheets.

Example

Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). Manually add a new sheet of express report document, and save the changes programmatically:

// Get a service used to work with express report
var eaxMdService = expressBox.getService();
// Get express report document
var eaxDocument = expressBox.getSource();
// Handle the Saved event
eaxMdService.Saved.add(function (sender, args) {
    // Get key of the current express report document
    console.log("Document with the " + args.Report.getKey() + " key is saved.");    
});
// Save express report document
eaxMdService.saveObject(eaxDocument);

After executing the example the express report document is saved, the Saved event handler is fired, and the browser console displays an appropriate message:

Document with the 108 key is saved.

See also:

EaxMdService