IMDCalculationSource.IncludeInPointset

Syntax

IncludeInPointset: Boolean;

Description

The IncludeInPointset property determines whether this data source is included into initial set of data sources, by which a list of calculation points is created.

Comments

The list of calculation points is created on the basis of all elements contained in fixed dimensions of initial set data sources.

Example

Executing the example requires that the repository contains a database with the MDBD identifier and three standard cubes CUBE_INPUT1, CUBE_INPUT2 and CUBE_OUTPUT. These cubes are based on the tables stored in this database.

Sub Main;
Var
    MB: IMetabase;
    CrInfo: IMetabaseObjectCreateInfo;
    MObj: IMetabaseObject;
    MDCalc: IMDCalculation;
    Cube: ICubeModel;
    Source: IMDCalculationSource;
    Destination: IMDCalculationDestination;
    FormulasTable: IMDCalculationFormulasTable;
    TableForFormulas: ITable;
Begin
    MB := MetabaseClass.Active;
    CrInfo := MB.CreateCreateInfo;
    CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_MDCALCULATION;
    CrInfo.Id := MB.GenerateId(
"MDCALC_1");
    CrInfo.Name := 
"Multidimensional calculation on server";
    CrInfo.Parent := 
Null;
    MObj := MB.CreateObject(CrInfo).Edit;
    MDCalc := MObj 
As IMDCalculation;
    
//Add database
    MDCalc.Database := MB.ItemById("MDBD").Bind As IDatabase;
    
//Determine the first cube source
    Cube := MB.ItemById("CUBE_INPUT1").Bind As ICubeModel;
    Source := MDCalc.Sources.AddCube(Cube);
    Source.IncludeInPointset := 
True;
    
//Determine the second cube source
    Cube := MB.ItemById("CUBE_INPUT2").Bind As ICubeModel;
    Source := MDCalc.Sources.AddCube(Cube);
    Source.IncludeInPointset := 
True;
    
//Determine destination cube
    Destination := MDCalc.Destination;
    Destination.SetCube(MB.ItemById(
"CUBE_OUTPUT").Bind As ICubeModel);
    
//Create a new formulas table
    If MDCalc.TimeDependencyEnabled Then
        MDCalc.TimeDependent := 
True;
    
End If;
    FormulasTable := MDCalc.FormulasTable;
    TableForFormulas := FormulasTable.Create;
    FormulasTable.Attach(TableForFormulas);
    MObj.Save;
End Sub Main;

After executing the example the Multidimensional Calculation on DB Server object is created in the repository root. One source cube and one destination cube are set, a new formulas table is created. If the destination cube has a calendar dimension, a formula actual period can be specified.

See also:

IMDCalculationSource