EaxMdService.setParams

Syntax

setParams(analyzer: PP.Exp.EaxAnalyzer, paramsMeta, callback: PP.Delegate);

Parameters

analyzer. Express report, for the parameters of which the user should define settings.

paramsMeta. Settings of express report data source parameters.

callback. Callback function.

Description

The setParams method sets metadata of express report data source parameters.

Example

Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). A parameter with the settings specified in the figure below must be defined for the express report data source (cube):

Change parameter value:

// Get service used to work with express report
var eaxMdService = expressBox.getService();
// Get express report document
var eaxDocument = expressBox.getSource();
// Get the Data Source Parameters panel
var paramsPanel = expressBox.getPropertyBarView().getDataSourceParamsPanel();
var paramsMeta = [{
    dt: 1,
    id: "STRPARAM",
    k: 1,
    n: "EaxParam",
    value: "12",
    vis: true
}];
// Determine callback function arguments
var onSetDataSourceParamsArgs = new PP.Mb.Ui.PropertyChangedEventArgs({
    PropertyName: PP.Exp.Ui.ControlType.DataSourceParams,
    Metadata: {
        params: paramsMeta
    },
    TypeUpdateData: [PP.Exp.Ui.ViewTypeUpdate.DataView, PP.Exp.Ui.ViewTypeUpdate.Ribbon, PP.Exp.Ui.ViewTypeUpdate.DimBar]
});
// Determine callback function
var onSetDataSourceParams = function (sender, args) {
    expressBox.getPropertyBarView().PropertyChanged.fire(this, args.Args);
}
// Send parameter settings to service
eaxMdService.setParams(eaxDocument, paramsMeta, PP.Delegate(onSetDataSourceParams, this, onSetDataSourceParamsArgs));

After executing the example save the express report and refresh it using browser tools. As a result, value of the parameter EaxParam is set to 12:

See also:

EaxMdService