EaxMdService.setTitle

Syntax

setTitle(report: PP.Exp.EaxDocument, metadata: Object, callback: PP.Delegate);

Parameters

report. Express report document.

metadata. Object that contains title settings. It is a JSON object that has the following properties: isControl - parameter indicating if the title is shown as a plain text and not as a control, visible - parameter indicating title visibility in the report.

callback. Callback function.

Description

The setTitle method enables to show express report title.

Example

Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). Show express report title as plain text:

// Get a service used to work with express report
var eaxMdService = expressBox.getService();
// Get express report document
var eaxAnalyzer = expressBox.getSource();
// Determine header settings
var metadata = {
    isControl: False, // Use simple header (not a control)
    visible: True // Display header in express report
};
// Determine arguments for callback function
var args = new PP.Mb.Ui.PropertyChangedEventArgs({   
    PropertyName: PP.Exp.Ui.TitleProperties.Visible,
    Metadata: metadata,
    TypeUpdateData: PP.Exp.Ui.ViewTypeUpdate.Title
});
// Determine callback function
var onPanelChanged = function (n, t) {        
    var chartView = expressBox.getDataView().getChartView();    
    t ? (chartView.DataChanged.fire(chartView, t.Args), t.Args.fireCallback(n, t)) : chartView.DataChanged.fire(chartView, t);
    // Refresh express report header
    var title = expressBox.getDataView().getTitleView();
    title.refreshAll();
};
// Set header as a simple text
eaxMbService.setTitle(eaxAnalyzer, metadata, PP.Delegate(this.onPanelChanged, eaxMdService, args));

After executing the example the express report header is shown as plain text:

See also:

EaxMdService