PrxMdService.setControlsValue

Syntax

setControlsValue(report, metadata, callback);

Parameters

report. Regular report.

metadata. Metadata.

callback. Callback.

Description

The setControlsValue method sets value for a control.

Example

The ReportBox component with the ReportBox name and the service to work with the regular report with the PrxMbService name is required on the HTML page to execute an example (see Example of the ReportBox Component Layout). The report should contain a control panel.

In the end of the renderReport function add handling of the GridView.Rendered event to call the setControlsValue function, which will be executed on rendering a regular report table:

reportBox.getDataView().getGridView().Rendered.add(setControlsValue,this);

Create the setControlsValue function:

function setControlsValue() {
    var md = reportBox.getSource().getMetadata();
    var cmd = md.controls;
    cmd.its.it[0].value.value = "New row";
    prxMbService.setControlsValue(prxReport, cmd.its.it, null);
    reportBox.getDataView().getControlBar().refresh()
}

The New Row value is set for the first control after an example execution.

See also:

PrxMdService