SheetControls(Sheet: IPrxSheet): IPrxControls;
Sheet - report sheet.
The SheetControls property returns the collection of sheet controls.
The following example assumes that there is the Report object with the IPrxReport type.
Sub UserProc;
Var
Rep : IPrxReport;
Ctrls : IPrxReportControls;
Ctrl : IPrxControl;
Sheet : IPrxSheet;
Begin
Ctrls := Rep.Controls.Edit;
//drop-down list
Ctrl := Ctrls.Add(Null);
Ctrl.AutoRecalc := True;
Ctrl.Binding := "UI=""DimCombo""";
Ctrl.Dimension := Rep.DataSources.Item(0).Slices.FindByName("Slice1").Dimensions.FindById("D_TO");
Ctrl.Appearance.Report := False;
Ctrl.Appearance.Sheet(Rep.Sheets.Item(0)) := True;
Ctrl.Appearance.Sheet(Rep.Sheets.Item(1)) := True;
//integer values editor
Ctrl := Ctrls.Add(Null);
Ctrl.AutoRecalc := True;
Ctrl.Binding := "UI=""IntegerEdit"" VALUE=""50""";
Ctrl.Appearance.Report := False;
Ctrl.Appearance.Sheet(Rep.Sheets.Item(0)) := True;
Ctrl.Appearance.Sheet(Rep.Sheets.Item(1)) := True;
Ctrls.Save;
//order of controls for Sheet1
Sheet := Rep.Sheets.Item(0);
Ctrls := Rep.Controls;
Ctrls.SheetControls(Sheet).Move(1,0); //second element to the first position
End Sub UserProc;
After executing the example two controls are created for the two first report sheets. Order of elements is changed for the first sheet.
See also: