SetValueC(Value: Variant; [Context: IPrxReportRecalcContext = Null]): IPrxReportRecalcContext;
Value. Value of control.
Context. Report calculation parameters. If this parameter is not specified, new parameters of report calculation are created.
The SetValueC method sets value of a control and report recalculation.
The value that is specified in the Value parameter depends on the control type in use. The available values are described in comments to the IPrxControl.Value property.
Executing the example requires a form with connected regular report.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Rep: IPrxReport;
Ctrl: IPrxControl;
Cont: IPrxReportRecalcContext;
Context: IPrxReportRecalcContext;
Sheet: IPrxSheet;
Tab: IPrxTable;
Begin
Rep := UiReport1.Instance As IPrxReport;
Ctrl := Rep.Controls.FindById("Item");
Context := Rep.CreateRecalcContext;
Sheet := Rep.Sheets.Item(0);
Context.RecalcSheet(Sheet) := TriState.OnOption;
Tab := Rep.ActiveSheet As IPrxTable;
Cont := Ctrl.SetValueC(Tab.TabSheet.ParseRange("A0").Value, Context);
End Sub Button1OnClick;
After executing the example the value of the control with the Item identifier is changed. A new value is taken from the A0 cell of the active sheet of the regular report. After setting the new value the report is recalculated.
See also: