Binding: String;
The Binding property determines parameters of the editor, which is used to edit values of control.
Editor parameters are set using connection string. To get the binding string, use the IBindingValue.AsString property.
Executing the example assumes that the repository contains a regular report with the Report identifier. The regular report contains at least one control.
Sub EditPrxControl;
Var
MB: IMetabase;
Report: IPrxReport;
Control: IPrxControl;
BM: IBindingManager;
IntegerEditBinding: IBindingIntegerEdit;
Begin
Mb := MetabaseClass.Active;
Report := MB.ItemById("Report").Edit As IPrxReport;
Control := Report.Controls.Item(0);
//Set up value editor
BM := New BindingManager.Create;
IntegerEditBinding := BM.CreateByUi("IntegerEdit") As IBindingIntegerEdit;
IntegerEditBinding.MinValue := -100;
IntegerEditBinding.MaxValue := 100;
IntegerEditBinding.Value := 0;
Control.Binding := IntegerEditBinding.AsString;
(Report As IMetabaseObject).Save;
End Sub EditPrxControl;
On executing the example parameters of values editor are set for regular report control: integer editor is used to set value, available values range is [-100; 100], the default value is 0.
See also: