IPrxControl.Recreate

Syntax

Recreate;

Description

The Recreate method recreates a control.

Example

Sub ControlRecreate;
Var
    Rep: IPrxReport;
    Ctrl: IPrxControl;
    sBind: String;
Begin
    Rep := PrxReport.ActiveReport;
    Ctrl := Rep.Controls.FindById(
"Item");
    sBind := Ctrl.Binding;
    
If sBind.IndexOf("10") >= 0 Then
        sBind := 
"UI=""ComboBox"" SEPARATORS="";"" ITEMS=""1;2""";
    
Else
        sBind := 
"UI=""ComboBox"" SEPARATORS="";"" ITEMS=""10;20""";
    
End If;
    Ctrl.Binding := sBind;
    Ctrl.Recreate;
End Sub ControlRecreate;

This example is a macro for a regular report. Executing the macro recreates the control with the Item identifier.

See also:

IPrxControl