Apply(App: ICubeSelectionControlApply): Boolean;
App. Dimension selection.
The Apply method applies calculation parameters according to dimension selection.
Executing the example requires that the repository contains multidimensional calculation with the MDCALC identifier.
Sub UserProc;
Var
MB: IMetabase;
Calc: IMDCalculation;
CalcInst: IMDCalculationInstance;
Apply: ICubeSelectionControlApply;
SelS: IDimSelectionSet;
Sel: IDimSelection;
Begin
MB := MetabaseClass.Active;
Calc := MB.ItemById("MDCALC").Bind As IMDCalculation;
CalcInst := (Calc As IMetabaseObject).Open(Null) As IMDCalculationInstance;
Apply := CalcInst.CreateApply(CalcInst.Destination);
SelS := CalcInst.Sources.Item(0).DimensionSet;
Debug.WriteLine("---Source---");
Apply.SourceSelection := SelS;
For Each Sel In SelS Do
Debug.WriteLine(Sel.Dimension.Name);
End For;
CalcInst.Apply(Apply);
Debug.WriteLine("---Result---");
SelS := Apply.ResultSelection;
For Each Sel In SelS Do
Debug.WriteLine(Sel.Dimension.Name);
End For;
End Sub UserProc;
After executing the example the object that controls 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: