IVirtualCubeDimensionFix.Compound

Syntax

Compound: IVirtualCubeCompound;

Description

The Compound property determines a composite structure of dimension.

Comments

If fixed dimension of virtual cube does not contain composite structures, Compound returns Null.

Example

Executing the example requires that the repository contains time series databases with the FC_FIRST and FC_SECOND identifiers. Add links to the Metabase and Cubes assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    Ci: IMetabaseObjectCreateInfo;
    VirtCube: IVirtualCube;
    SourceInst: ICubeInstance;
    Dest: ICubeInstanceDestination;
    VirtSour: IVirtualCubeSource;
    i: Integer;
    DimFix: IVirtualCubeDimensionFix;
Begin
    Mb := MetabaseClass.Active;
    Ci := Mb.CreateCreateInfo;
    Ci.ClassId := MetabaseObjectClass.KE_CLASS_EXPRESSREPORT;
    Ci.Permanent := False;
    // Create a virtual cube
    Ci.ClassId := MetabaseObjectClass.KE_CLASS_VIRTUALCUBE;
    VirtCube := Mb.CreateObject(Ci).Edit As IVirtualCube;
    // Add the 1st time series database to virtual cube 
    SourceInst := Mb.ItemById("FC_FIRST").Open(NullAs ICubeInstance;
    Dest := SourceInst.Destinations.DefaultDestination;
    VirtCube.Sources.Add(Dest.DestinationModel);
    // Add the 2nd time series database to virtual cube 
    SourceInst := Mb.ItemById("FC_SECOND").Open(NullAs ICubeInstance;
    Dest := SourceInst.Destinations.DefaultDestination;
    VirtSour := VirtCube.Sources.Add(Dest.DestinationModel);
    For i := 0 To VirtSour.FixInfo.Count - 1 Do
        DimFix := VirtSour.FixInfo.Item(i) As IVirtualCubeDimensionFix;
       DimFix.Pinned := True;
        // Save virtual cube}
        (VirtCube As IMetabaseObject).Save;
        // Display information about composite dictionary
        Debug.WriteLine("Dictionary: ");
        Select Case DimFix.PredefinedCompound
            Case VirtualCubeCompoundPredeterminedType.Custom: Debug.WriteLine("    custom");
            Case VirtualCubeCompoundPredeterminedType.Fact: Debug.WriteLine("    facts");
            Case VirtualCubeCompoundPredeterminedType.Calendar: Debug.WriteLine("    calendar");
            Case VirtualCubeCompoundPredeterminedType.Scenario: Debug.WriteLine("    scenarios");
        End Select;
        Debug.WriteLine("    Composite: " + (DimFix.Compound <> Null).ToString);
    End For;
End Sub UserProc;

After executing the example a virtual cube is created based on these two time series databases. The console window displays information about fixed dimensions of the second source of virtual cube.

See also:

IVirtualCubeDimensionFix