Add(Sheet: IPrxSheet): IPrxControl;
Sheet; Regular report sheet.
The Add method adds a control of the regular report sheet. The sheet to be controlled by the new control is passed using the Sheet parameter (if Null is global for the report).
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
Contr: IPrxReportControls;
Contr1: IPrxControl;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("Report").Edit;
Report := MObj As IPrxReport;
Contr := Report.Controls;
Contr1 := Contr.Add(Null);
Contr1.AutoRecalc := True;
Contr1.Binding := "UI="+#34+"IntegerEdit"+#34;
Contr1.ControlledBy := Report.MetabaseObject.Params.Item(0);
Contr1.Id := "ItemX";
Contr1.Name := "ItemX";
Contr1.Value := 0;
MObj.Save;
End Sub Main;
After executing the example a control is created in the regular report with the Report identifier.
See also: