EaxMdService.setPivotDimsConfirm

Syntax

setPivotDimsConfirm(report: PP.Exp.EaxDocument, ownerDimsMetadata: Object, callback: PP.Delegate);

Parameters

report. Express report document.

ownerDimsMetadata. Metadata that contains information on dimensions and their positions.

callback. Callback function that gets report metadata.

Description

The setPivotDimsConfirm method sets dimensions position and shows a confirmation dialog box in case table data has been changed.

Example

Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component) and have a loaded table in express report working area. The report must contain unsaved changes, and the data source must have dimensions with the following keys: 98, 103, 104, 105 and 106. One of these dimensions must be shown in columns, for example, the Calendar dimension with the 106 key (the figure below shows the 2005 element):

Change position of the Calendar dimension to table rows:

// Get a service used to work with express report
var eaxMdService = expressBox.getService();
// Get properties panel
var dimBar = expressBox.getPropertyBarView().getDimBarViewPanel();
// Display panel
dimBar.show();
// Expand panel
dimBar.expand(True);
// Determine metadata
var metadata = {
    dims: {
        its: {
            it: [{
                "k": 105, // The Territories dimension
                "position": "Left"
            }, {
                "k": 106, // The Calendar dimension
                "position": "Left" 
            }, {
                "k": 98, // The Facts dimension
                "position": "Top"
            }, {
                "k": 103,
                "position": "Fixed"
            }, {
                "k": 104,
                "position": "Fixed"
            }]
        }
    }
};
var metadataForService = new PP.Mb.Ui.PropertyChangedEventArgs({
    PropertyName: PP.Exp.Ui.ControlType.DimOrder,
    Metadata: metadata,
    TypeUpdateData: [PP.Exp.Ui.ViewTypeUpdate.DataView, PP.Exp.Ui.ViewTypeUpdate.Ribbon, 
        PP.Exp.Ui.ViewTypeUpdate.PropertyBar] }); // Define the callback function var onPivotDimsConfirm = function (sender, args) {     expressBox.getDataView().getMapView().MetadataChanged.fire(this, args.Args);     expressBox.refreshAll() }; // Set a new format eaxMdService.setPivotDimsConfirm(expressBox.getSource(), metadata,
    PP.Delegate(onPivotDimsConfirm, this, metadataForService));

After executing the example the data saving confirmation dialog box opens:

After the user clicks the No button (do not save changes), the Calendar dimension is shown in table rows:

See also:

EaxMdService