IterativeCalculation: Boolean;
The IterativeCalculation property determines whether to use iterative calculations that allow calculation of cells containing formulas that include circular references. Iterative calculations are used when the property is set to True, and not used when the property is set to False.
The property is set to False by default.
If the property is set to True, formulas are calculated. When parameters of iterative calculation (MaxChange, MaxIterations) are changed, formulas are automatically recalculated on enabled iterative calculation.
Permissions for circular references are granted within a single sheet. If cells contain circular formulas referring to values of the cells of other sheets, the "Circular references are found" error message is displayed even if interactive mode is enabled.
If a cycle appears when a formula is entered into the cell and iterative calculation of circular references is enabled, the initial value of this cell is considered to be equal to zero. When this mode is enabled the cycle with defined parameters is iterated each time the report is calculated. The cycle ends when the maximum iteration limit is reached (MaxIterations), or when the change of value of each cell becomes less than the relative error (MaxChange).
This setting can differ for different sheets of a regular report, so you need to take into account some features.
Executing the example requires a form containing the following components: the UiTabSheet component with the UiTabSheet1 identifier and the TabSheetBox component with the TabSheetBox1 identifier. The UiTabSheet1 component is used as a data source for the TabSheetBox1 component.
Sub UserProc;
Var
Tab : ITabSheet;
Options: ITabOptions;
Begin
Tab := UiTabSheet1.TabSheet;
Options := Tab.Options;
Options.IterativeCalculation := True;
Options.MaxIterations := 10;
Options.MaxChange := 0.01;
End Sub UserProc;
After executing the procedure, iterative calculation is enabled for a sheet or a table, and its parameters are specified.
See also: