IVirtualCubeSource.JoinList

Fore Syntax

JoinList: IVirtualCubeDimensionJoinList;

Fore.NET Syntax

JoinList: Prognoz.Platform.Interop.Cubes.IVirtualCubeDimensionJoinList;

Description

The JoinList property returns the list of comparisons of dimensions of the current source with dimensions of other sources.

Comments

By default, dimensions of different sources of virtual cube are not compared with each other. The virtual cube contains dimensions common for all dimension sources, and unique dimensions form a composite dimension. The composite dimension contains the elements, which are fixed in unique dimensions.

Comparison enables the user to link unique dimensions of different sources. After comparison, unique dimensions can be unfixed. In this case the virtual cube uses dimension of the current source cube. On changing the selection, this dimension will be used to compare elements and create selection for unique dimensions of other source cubes.

Fore Example

Executing the example requires that the repository contains a virtual cube with the V_Cube identifier. The virtual cube is built on two cubes:

Sub UserProc;
Var
    MB: IMetabase;
    Cube: IVirtualCube;
    VSource: IVirtualCubeSource;
    JoinList: IVirtualCubeDimensionJoinList;
    Joins: IVirtualCubeDimensionJoins;
    Dim: IDimensionModel;
    Index: IDimIndex;
Begin
    MB := MetabaseClass.Active;
    Cube := MB.ItemByID("V_Cube").Edit As IVirtualCube;
    //First source
    VSource := Cube.Sources.Item(0);
    Dim := VSource.Cube.Dimensions.FindById("COUNTRY");
    Index := Dim.Indexes.FindById("ISO");
    JoinList := VSource.JoinList;
    Joins := JoinList.Add(Dim, Index);
    //Second source
    VSource := Cube.Sources.Item(1);
    Dim := VSource.Cube.Dimensions.FindById("CAPITAL");
    Index := Dim.Indexes.FindById("COUNTRY_ISO");
    Joins.Add(VSource, Dim, Index);
    //Unfix dimension
    VSource.FixInfo.Item(1).Fixed := False;
    (Cube As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the COUNTRY dimension is compared with the CAPITAL dimension, elements of these dimensions are compared by values of attributes with ISO codes of countries. On opening the cube the selection is set in the COUNTRY dimension, after which the corresponding selection is formed and passed to the CAPITAL dimension.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Cube: IVirtualCube;
    VSource: IVirtualCubeSource;
    JoinList: IVirtualCubeDimensionJoinList;
    Joins: IVirtualCubeDimensionJoins;
    Dim: IDimensionModel;
    Index: IDimIndex;
Begin
    MB := Params.Metabase;
    Cube := MB.ItemById["V_Cube"].Edit() As IVirtualCube;
    //First source
    VSource := Cube.Sources.Item[0];
    Dim := VSource.Cube.Dimensions.FindById("COUNTRY");
    Index := Dim.Indexes.FindById("ISO");
    JoinList := VSource.JoinList;
    Joins := JoinList.Add(Dim, Index);
    //Second source
    VSource := Cube.Sources.Item[1];
    Dim := VSource.Cube.Dimensions.FindById("CAPITAL");
    Index := Dim.Indexes.FindById("COUNTRY_ISO");
    Joins.Add(VSource, Dim, Index);
    //Unfix dimension
    VSource.FixInfo.Item[1].Fixed := False;
    (Cube As IMetabaseObject).Save();
End Sub;

See also:

IVirtualCubeSource