IPivotFilterSources.Inverted

Syntax

Inverted: Boolean;

Description

The Inverted property determines whether a filter is used in inverted mode.

Comments

Available values:

Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier that is based on a cube, and a filter with the FILTER identifier. Filter and cube structure and selection are identical.

Add links to the Cubes, Dimensions, Express, Matrix, Metabase, Pivot system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    MbObj: IMetabaseObject;
    ObjParams: IMetabaseObjectParamValues;
    ObjParamsEx: IMetabaseObjectParamValuesEx;
    Eax: IEaxAnalyzer;
    Pvt: IPivot;
    Filter: IPivotFilterSettings;
    FltrSources: IPivotFilterSources;
    FltrSource: IPivotFilterSource;
    CubeSelSet: IDimSelectionSet;
    Cube: ICubeInstance;
    Dest: ICubeInstanceDestination;
Begin
    // Get repository
    Mb := MetabaseClass.Active;
    // Get cube used as a filter
    MbObj := MB.ItemById("FILTER"As IMetabaseObject;
    ObjParams := MbObj.Params.CreateEmptyValues;
    ObjParamsEx := ObjParams As IMetabaseObjectParamValuesEx;
    ObjParamsEx.StateOptions := 2;
    Cube := MbObj.Open(ObjParams) As ICubeInstance;
    Dest := Cube.Destinations.Item(0);
    // Get cube selection
    CubeSelSet := Dest.CreateDimSelectionSet;
    // Get express report
    Eax := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    // Get settings for displaying report data table
    Pvt := Eax.Pivot;
    // Determine filtering parameters
    Filter := Pvt.Filter As IPivotFilterSettings;
    // Set use of external filter
    FltrSources := Filter.FilterSources;
    CubeSelSet := Pvt.Selection;
    Pvt.BeginUpdate;
    FltrSources.Clear;
    // Enable use of filter in inverted mode
    FltrSources.Enable := True;
    FltrSources.Inverted := True;
    // Add filter
    FltrSource := FltrSources.Add;
    // Add a data source for filtering
    FltrSource.DataSource := Dest As IMatrixDataSource;
    // Get selection, by which filtering will be executed
    FltrSource.Selection := CubeSelSet;
    FltrSource.Enable := True;
    Pvt.EndUpdate;
    // Save report
    (Eax As IMetabaseObject).Save;
End Sub UserProc;

After executing the example, the report will have only the values of elements, for which the filter does not contain values.

See also:

IPivotFilterSources