IMDCalculationInstance.CreateApply

Syntax

CreateApply(Dataset:IMDCalculationDestinationInstance): ICubeSelectionControlApply;

Parameters

Dataset - data consumer instance of multidimensional calculation on DB server.

Description

The CreateApply method creates an object controlling multidimensional calculation parameters based on dimensions selection.

Example

Executing the example requires that the repository contains multidimensional calculation with the MDCALC identifier.

Sub Main;

Var

MB: IMetabase;

Calc: IMDCalculation;

CalcInst: IMDCalculationInstance;

Ap: ICubeSelectionControlApply;

Se: IDimSelection;

Begin

MB := MetabaseClass.Active;

Calc := MB.ItemById("MDCALC").Bind As IMDCalculation;

CalcInst := (Calc As IMetabaseObject).Open(Null) As IMDCalculationInstance;

Ap := CalcInst.CreateApply(CalcInst.Destination);

Ap.SourceSelection := CalcInst.Sources.Item(0).DimensionSet;

Debug.WriteLine("---Source---");

For Each Se In Ap.SourceSelection Do

Debug.WriteLine(Se.Dimension.Name);

End For;

CalcInst.Apply(Ap);

Debug.WriteLine("---Result---");

For Each Se In Ap.ResultSelection Do

Debug.WriteLine(Se.Dimension.Name);

End For;

End Sub Main;

After executing the example the object, controlling parameters of multidimensional calculation via selection, is created. This object will be executed. The source list of changes and output changes list will be displayed.

See also:

IMDCalculationInstance