IEaxPivotDimensionInstance.PivotSlice

Syntax

PivotSlice: IEaxDataAreaPivotSlice;

Description

The PivotSlice property returns slice of the table built on multydimensional source.

Comments

To get dimension of the table built on multidimensional data source, use IEaxPivotDimensionInstance.PivotDimension.

Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier containing table.

Add links to the Dimesnions, Express, Metabase, Pivot system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Analyzer: IEaxAnalyzer;
    DA: IEaxDataArea;
    Slice: IEaxDataAreaSlice;
    PivotDimKey: Integer;
    DimensionInst: IEaxDimensionInstance;
    PivDimInst: IEaxPivotDimensionInstance;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get express report
    Analyzer := MB.ItemById("EXPRESS").Bind As IEaxAnalyzer;
    // Get data area
    DA := Analyzer.DataArea;
    // Get data slice
    Slice := DA.Slices.Item(0);
    // Get dimension key
    PivotDimKey := Analyzer.Pivot.DimItem(3).Key;
    // Get dimension data by key
    DimensionInst := Slice.GetDimension(PivotDimKey);
    // Get description of dimension data source
    PivDimInst := DimensionInst As IEaxPivotDimensionInstance;
    // Display to the console dimension name and table displaying mode
    Debug.WriteLine("Dimension name - " + PivDimInst.PivotDimension.DimInstance.Name);
    Select Case PivDimInst.PivotSlice.Pivot.ViewMode As Integer
        Case 0: Debug.WriteLine("Table displaying mode - DimInSlot");
        Case 1: Debug.WriteLine("Table displaying mode - LevInSlot");
        Case 2: Debug.WriteLine("Table displaying mode - Default");
    End Select;
End Sub UserProc;

After executing the example, the console displays dimension name and table displaying mode.

See also:

IEaxPivotDimensionInstance