RecursionEnabled: TriState;
The RecursionEnabled property determines whether recursion can be used in formulas.
Recursion is available in formulas if:
Values of data source and data consumer are saved in the same table.
Data source and data consumer have the same structure.
Fixed and free dimensions are matched in the settings of multidimensional calculation for data source and data consumer.
NOTE. Recursion cannot be calculated if query serves as a data source.
Executing the example requires that the repository contains multidimensional calculation on DB server with the MDCalc_1 identifier.
Sub Main;
Var
MB: IMetabase;
MDInst: IMDCalculationInstance;
Args: IMDCalculationCalculateArgs;
Begin
MB := MetabaseClass.Active;
MDInst := MB.ItemById("MDCalc_1").Open(Null) As IMDCalculationInstance;
Args := MDInst.CreateCalculateArgs;
Args.CleanType := MDCalculateArgsCleanType.All;
If Args.RecursionEnabled = TriState.OnOption Then
Args.Recursion := TriState.OffOption;
End If;
MDInst.Calculate(Args);
End Sub Main;
After executing the example multidimensional calculation is executed on DB server. The data consumer is cleared before calculation. If creation of recursive formulas is available in the multidimensional calculation during formula creation, formulas interdependency is disabled on calculation.
See also: