SliceFilter(Slice: IMDCalculationSlice): IMDCalculationSliceFilter;
Slice. Data consumer slice, by which element filtering must be set up.
The SliceFilter property returns filtering settings of elements used in calculation.
Executing the example requires that the repository contains multidimensional calculation at the DB server with the MDCalc_1 identifier. The data consumer contains the calendar dimension, on which a slice with the CALENDAR identifier is built.
Sub Main;
Var
MB: IMetabase;
MDInst: IMDCalculationInstance;
Args: IMDCalculationCalculateArgs;
Filter: IMDCalculationSliceFilter;
Begin
MB := MetabaseClass.Active;
MDInst := MB.ItemById("MDCalc_1").Open(Null) As IMDCalculationInstance;
Args := MDInst.CreateCalculateArgs;
//filter using Selection'a
Filter := Args.SliceFilter(MDInst.Calculation.Destination.Slices.FindById("CALENDAR"));
Filter.Type := MDCalculationSliceFilterType.Selection;
Filter.Selection.SelectElement(0, True);
Filter.Selection.SelectElement(32, True);
MDInst.Calculate(Args);
End Sub Main;
After executing the example multidimensional calculation is executed on DB server. Calculation is executed by the selected elements containing formulas.
See also: