EaxMdService.setMd

Syntax

setMd(sheet: PP.Exp.EaxDocument);

Parameters

sheet. Express report document.

Description

The setMd method sets metadata to express report object.

Example

Executing the example requires that the HTML page contains the HtmlExportDialog component named htmlExpDialog (see Example of Creating the HtmlExportDialog Component):

Replace contents of the showExpDialogOkClick function that handles clicking the OK button, with the following script:

function showExpDialogOkClick(sender, args, callback) {
    // Determine data to export
    var exportData = args.exportData || args || {};
    exportData.storeResult = True;
    exportData.palette = True;
    // Determine message body with data to export
    var body = {
        GetEaxMd: {
            tEax: eaxAnalyzer.getDocumentOdId ? eaxAnalyzer.getDocumentOdId() : eaxAnalyzer.getOdId(),
            tArg: {
                pattern: {
                    exportData: exportData
                }
            }
        }
    };
    // Set metadata to express report object
    eaxMdService.setMd(eaxAnalyzer);
    // Determine callback function
    callback = eaxMdService._visitCallback(callback, new PP.Delegate(eaxMdService._onExportCompleted, eaxMdService, {
        Report: eaxAnalyzer
    }));
    // Send a message to the service with express report exported data
    eaxMdService._send(body, callback);
};

After executing the example clicking the OK button shows the dialog box for saving file that is exported to HTML.

See also:

EaxMdService