IMDCalculationCalculateArgs.SliceFilter

Syntax

SliceFilter(Slice: IMDCalculationSlice): IMDCalculationSliceFilter;

Parameters

Slice. Data consumer slice, by which element filtering must be set up.

Description

The SliceFilter property returns filtering settings of elements used in calculation.

Example

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(NullAs IMDCalculationInstance;
    Args := MDInst.CreateCalculateArgs;
    
//filter using Selection'a
    Filter := Args.SliceFilter(MDInst.Calculation.Destination.Slices.FindById("CALENDAR"));
    Filter.Type := MDCalculationSliceFilterType.Selection;
    Filter.Selection.SelectElement(
0True);
    Filter.Selection.SelectElement(
32True);
    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:

IMDCalculationCalculateArgs