AllFormulas: IMDCalculationFormulasIterator;
AllFormulas: Prognoz.Platform.Interop.Cubes.IMDCalculationFormulasIterator;
The AllFormulas method returns iterator by formulas of multidimensional calculation.
Executing the example requires that the repository contains multidimensional calculation with the OBJMD identifier.
Sub UserProc;
Var
Mb: IMetabase;
MDInst: IMDCalculationInstance;
Iterator: IMDCalculationFormulasIterator;
i: integer;
Begin
Mb := MetabaseClass.Active;
MDInst := Mb.ItemById("OBJMD").Open(Null) As IMDCalculationInstance;
Iterator := MDInst.AllFormulas;
i := 0;
While Not Iterator.Eof Do
i := i + 1;
Iterator.Next;
End While;
Debug.WriteLine(Number of formulas: + i.ToString);
End Sub UserProc;
After executing the example the number of existing formulas in multidimensional calculation is displayed in the console window.
Executing the example requires that the repository contains multidimensional calculation with the OBJMD identifier. The specified procedure is an entry point of the .NET assembly.
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Metabase;
Public Shared Sub Main(Params: StartParams);
Var
Mb: IMetabase;
MDCalc: IMDCalculationInstance;
Iterator: IMDCalculationFormulasIterator;
i: integer;
Begin
Mb := Params.Metabase;
MDCalc := Mb.ItemById["OBJMD"].Open(Null) As IMDCalculationInstance;
Iterator := MDCalc.AllFormulas();
i := 0;
While Not Iterator.Eof() Do
i := i + 1;
Iterator.Next();
End While;
System.Diagnostics.Debug.WriteLine(Number of formulas: + i.ToString());
End Sub;
After executing the example the number of existing formulas in multidimensional calculation is displayed in the console window.
See also: