IPivot.Matrix

Syntax

Matrix: IMatrix;

Description

The Matrix property returns table data as a matrix.

Comments

A data matrix is a set of data presented in numeric format and including rows and columns.

Example

Executing the example requires that the repository contains an express report with the EXPRESS_PIVOT identifier. The report contains a table.

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

Sub UserProc;
Var
    MB: IMetabase;
    DimSelectionSet: IDimSelectionSet;
    Analyzer: IEaxAnalyzer;
    Pivot: IPivot;
    PivotMatrix: IMatrix;
    DimCount: Integer;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get express report
    Analyzer := MB.ItemById("EXPRESS_IPIVOT").Bind As IEaxAnalyzer;
    // Get express report data table
    Pivot := Analyzer.Pivot;
    // Get dimension selection, by which the table is built
    DimSelectionSet := Pivot.Selection;
    // Select all selection elements
    DimSelectionSet.Item(0).SelectAll;
    // Get table data as a matrix
    PivotMatrix := Pivot.Matrix;
    // Set value in the matrix by dimension selection
    PivotMatrix.SetValueBySelection(DimSelectionSet, 10);
    // Get the number of matrix dimensions
    DimCount := PivotMatrix.DimensionCount;
    // Display in the console window
    Debug.WriteLine("Number of matrix dimensions = " + DimCount.ToString);
End Sub UserProc;

After executing the example:

See also:

IPivot