IPrxControlAppearance.Sheet

Syntax

Sheet(Sheet: IPrxSheet): Boolean;

Parameters

Sheet: Report sheet.

Description

The Sheet property determines whether a control is to be used on a certain sheet. If the property is set to True, the control is displayed for the specified sheet. If the property is set to False, the control is not displayed.

The default property value is False.

Example

The following example assumes that there is the Rep 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);

Rep.Controls.SheetControls(Sheet).Move(1,0); //second element to 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:

IPrxControlAppearance