MultipleFactors: Boolean;
The MultipleFactors property determines whether data is saved or extracted by several indicators.
Available values:
True. Execute operations with data of several indicators.
False. Execute operations with data of one indicator.
Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier. This database must contain a unique attribute of the indicator with the COUNTRIES identifier that refers to a dictionary.
Sub UserProc;
Var
MB: IMetabase;
RubrInst: IRubricatorInstance;
Cube: ICubeInstance;
Dest: ICubeInstanceDestination;
FactorExec: IRubricatorFactorExecutor;
FactorIO: IRubricatorFactorIO;
FactsLookup: IRubricatorFactsLookup;
MetaDLookup: IMetaDictionaryLookup;
Key: Array Of Integer;
i: Integer;
Cond: IOrmCondition;
Exec: ICubeInstanceDestinationExecutor;
Matr: IMatrix;
Ite: IMatrixIterator;
Begin
MB := MetabaseClass.Active;
RubrInst := MB.ItemById("OBJ_RUBRICATOR").Open(Null) As IRubricatorInstance;
Cube := RubrInst As ICubeInstance;
Dest := Cube.Destinations.DefaultDestination;
Exec := Dest.CreateExecutor;
FactorExec := Exec As IRubricatorFactorExecutor;
FactsLookup := RubrInst.CreateFactsLookup;
MetaDLookup := FactsLookup.Lookup;
Cond := MetaDLookup.Where.Add;
Cond.AttributeName := "COUNTRIES";
Cond.Value := 512;
i := FactsLookup.LookupFactors.Length;
Key := New Integer[i];
Key := FactsLookup.LookupFactors;
FactorExec.SetFactorKeys(Key);
FactorIO := FactorExec As IRubricatorFactorIO;
FactorIO.MultipleFactors := True;
FactorIO.ValueKind := MetaAttributeKind.Value;
FactorIO.ValueId := "VL";
Exec := FactorExec.AsCubeExecutor;
Exec.PrepareExecute(Null);
Exec.PerformExecute;
Matr := Exec.Matrix;
Ite := Matr.CreateIterator;
Ite.Move(IteratorDirection.First);
While Ite.Valid Do
Debug.WriteLine(Ite.Value);
Ite.Move(IteratorDirection.Next);
End While;
End Sub UserProc;
After executing the example the console window displays data of the indicators corresponding to the following condition: value of the COUNTRIES attribute equals to 512.
See also: