Report.getControls

Syntax

getControls(forSheet);

Parameters

forSheet. Report sheet index. Optional parameter, the list of controls of the opened report sheet is returned by default.

Description

The getControls method gets the list of controls for the specified report sheet.

Example

The ReportBox component which source is the Report class instance with the PrxReport name is required to execute an example. Add the ControlBarView.PropertyChanged event handler:

        reportBox.getDataAreaView().getControlBar().PropertyChanged.add(function (sender, args) {//handler for changing control bar property values
           var ind = prxReport.getSheetIndexByKey(prxReport.getActiveSheetKey())//return index of active report sheet
           prxReport.getControls(ind)[2].setVisibleForReport(true);//Make the second control of active report sheet visible for all sheets.
           reportBox.getDataAreaView().getControlBarView().refreshAll();//refresh the control bar
        })

The second control of the active report sheet is visible on all the report sheets after an example execution when changing the properties of the control bar (for example, when changing the dimension selection).

See also:

Report