IRubricatorFactorIO.CalendarSubstituteKey

Syntax

CalendarSubstituteKey: Integer;

Description

The CalendarSubstituteKey property determines a key of calendar dictionary used for data extraction and storage.

Comments

If CalendarSubstituteKey = -1, calendar dictionary, used by object, is used to extract and store data.

Example

Executing the example requires that the repository contains a time series database with the FC_COMM identifier and a calendar dictionary with the CALENDARSETUP identifier. Add links to the Metabase, Dimensions, Cubes and Matrix system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Inst: IRubricatorInstance;
    Cub: ICubeInstance;
    Dest: ICubeInstanceDestination;
    Exe: ICubeInstanceDestinationExecutor;
    Mat: IMatrix;
    FactorIO: IRubricatorFactorIO;
    CalendarObj: IMetabaseObjectDescriptor;
Begin
    mb := MetabaseClass.Active;
    Inst := mb.ItemById("FC_COMM").Open(NullAs IRubricatorInstance;
    Cub := Inst As ICubeInstance;
    Dest := Cub.Destinations.DefaultDestination;
    Exe := Dest.CreateExecutor;
    FactorIO := Exe As IRubricatorFactorIO;
    CalendarObj := mb.ItemById("CALENDARSETUP");
    FactorIO.CalendarSubstituteKey := CalendarObj.Key;
    Exe.PrepareExecute(Null);
    Exe.PerformExecute;
    Mat := Exe.Matrix;
End Sub UserProc;

After executing the example the Mat variable holds a matrix that contains data of the time series database with the FC_COMM identifier. Database data is retrieved according to parameters of the CALENDARSETUP calendar.

See also:

IRubricatorFactorIO