EaxMdService.setPrivateDimDisplayMode

Syntax

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

Parameters

report. Express report document.

metadata. Settings of private dimensions.

callback. Callback function.

Description

The setPrivateDimDisplayMode method shows private dimensions as a compound dimension in express report with several sources.

Example

Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). At least two data sources must be defined for express report.

Show private dimensions of express report with multiple sources as a single compound dimension:

// Get a service used to work with express report
var eaxMdService = expressBox.getService();
// Get express report document
var eaxAnalyzer = expressBox.getSource();
// Get private dimension panel
var items = expressBox.getPropertyBarView().getDimBarMasterView().getItems();
var dimBarPrivateMP = null;
for (var i in items) {
    if (items[i].getTypeName() == "EaxDimBarPrivateMP") {
        dimBarPrivateMP = items[i];
    }
};
if (dimBarPrivateMP != null) {
    // Determine settings of private dimensions
    var metadata = {
        changeSelection: {
            elRelative: "All",
            elSelectOp: "Set",
            setCompound: {
                displayAsCompound: True // Display dimensions as a composite dimension
            }
        },
        compound: {
            displayAsCompound: True,
            isCompound: False
        },
        id: "FACTS_COMPOUND",
        k: dimBarPrivateMP.getData(),
        n: "Facts"
    };
    // Determine arguments of callback function
    var args = new PP.Mb.Ui.PropertyChangedEventArgs({   
        PropertyName: PP.Exp.Ui.ControlType.PrivateDimsDisplayMode,
        Metadata: metadata,
        TypeUpdateData: PP.Exp.Ui.ViewTypeUpdate.PropertyBar
    });
    // 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 settings panel
        expressBox.getPropertyBarView().refreshAll()
    };
    // Initialize query of private dimensions as composite dimensions
    eaxMbService.setPrivateDimDisplayMode(eaxAnalyzer, metadata, PP.Delegate(this.onPanelChanged, eaxMdService, args));
};

After executing the example private dimensions of express report with multiple sources are shown as a compound dimension.

See also:

EaxMdService