Show contents 

Report > Report Assembly Interfaces > IPrxControl > IPrxControl.Appearance

IPrxControl.Appearance

Fore Syntax

Appearance: IPrxControlAppearance;

Fore.NET Syntax

Appearance: Prognoz.Platform.Interop.Report.IPrxControlAppearance;

Description

The Appearance property determines, which report sheets are controlled by the control.

Fore Example

The concerned example contains the Rep object of the IPrxReport type.

Sub UserProc;
Var
    Rep: IPrxReport;
    Ctrls: IPrxReportControls;
    Ctrl: IPrxControl;
    Sheet: IPrxSheet;
Begin
    Ctrls := Rep.Controls.Edit;
    
//drop-down menu
    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 the Sheet1
    Sheet := Rep.Sheets.Item(0);
    Rep.Controls.SheetControls(Sheet).Move(
10); //the second element to the first place
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.

Fore.NET Example

The following example contains the Rep object with the IPrxReport type.

Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Stat;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.ForeSystem;

Public Sub UserProc(Params: StartParams);
Var
    Rep: IPrxReport;
    Ctrls: IPrxReportControls;
    Ctrl: IPrxControl;
    Sheet: IPrxSheet;
Begin
    Ctrls := Rep.Controls.Edit();
    //drop-down menu
    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 the Sheet1
    Sheet := Rep.Sheets.Item[0];
    Rep.Controls.SheetControls[Sheet].Move(10); //the second element to the first place
End Sub;

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:

IPrxControl