EaxMdService.setMainControlElements

Syntax

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

Parameters

report. Express report document.

metadata. JSON object that contains settings for data aggregation in table fixed dimensions (the fixedElementsAggregation property, which values are elements of the PP.Exp.Ui.PvtAggregationOperation enumeration) and for data caching (the useDataCache property).

refreshPattern. Settings of express report update.

callback. Callback function.

Description

The setMainControlElements method sets data aggregation method for table fixed dimensions and allows or prohibits caching express report data.

Example

Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component).

Enable data summation in express report fixed dimensions:

// Get a service used to work with express report
var eaxMdService = expressBox.getService();
// Get express report document
var eaxAnalyzer = expressBox.getSource();
// Determine metadata
var metadata = {
    fixedElementsAggregation: PP.Exp.Ui.PvtAggregationOperation.Sum, // Sum data
    useDataCache: False // Prohibit data caching
};
var refreshPattern = "";
// Activate data aggregation
eaxMdService.setMainControlElements(eaxAnalyzer, metadata, refreshPattern, PP.Delegate(this.onPanelChanged, eaxMdService));
// Refresh express report
expressBox.refreshAll();

After executing the example data aggregation in fixed report dimensions is set in the Data tab of the express report properties panel. AutoSum mode is selected as the aggregation method.

EaxMdService | EaxMdService.setAgrMethod