IPivotTableHeader.IsGrouppingElement

Syntax

IsGrouppingElement(SlotNumber: Integer; ElementNumber: Integer): Boolean;

IsGrouppingElement(SlotNumber: integer; ElementNumber: integer): boolean;

Parameters

SlotNumber. Slot index in the table header.

ElementNumber. Element index in a table header.

Description

The IsGrouppingElement method returns whether a header element is a grouping one.

Comments

Available values:

Example

To execute the example, make sure that the repository contains an express report with the EXPRESS_SLOT_ROW identifier.

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

Sub Main;
Var
    mb: IMetabase;
    Report: IEaxAnalyzer;
    Pivot: IPivot;
    TableHeader: IPivotTableHeader;
    slot,row: Integer;
Begin
    
// Get the current repository
    mb := MetabaseClass.Active;
    
// Get express report
    Report := mb.ItemById("EXPRESS_SLOT_ROW").Bind As IEaxAnalyzer;
    
// Get object, based on which data table is built
    Pivot := Report.Pivot;
    
// Get table sidehead properties
    TableHeader := Pivot.ObtainTable.LeftHeader;
    
// Display indexes of grouping elements
    Debug.WriteLine("Indexes of grouping elements:");
    
For row := 0 To TableHeader.ElementCount -1 Do
        
For slot := 0 To TableHeader.SlotCount - 1 Do
            
If TableHeader.IsGrouppingElement(slot,row) Then
                Debug.WriteLine(row);
            
End If;
        
End For;
    
End For;
End Sub Main;

Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Pivot;

Public Shared Sub Main(Params: StartParams);
Var     
    mb: IMetabase;     
    Report: IEaxAnalyzer;     
    Pivot: IPivot;     
    TableHeader: IPivotTableHeader;
    slot,row: integer; 
Begin     
    
// Get the current repository     
    mb := Params.Metabase;
    
// Get express report     
    Report := mb.ItemById["EXPRESS_SLOT_ROW"].Bind() As IEaxAnalyzer;
    
// Get object, based on which data table is built     
    Pivot := Report.Pivot;
    
// Get table sidehead properties     
    TableHeader := Pivot.ObtainTable().LeftHeader;
    
// Display indexes of grouping elements     
    System.Diagnostics.Debug.WriteLine("Indexes of grouping elements:");
    
For row := 0 To TableHeader.ElementCount -1 Do
        
For slot := 0 To TableHeader.SlotCount - 1 Do         
            
If TableHeader.IsGrouppingElement[slot,row] Then
                System.Diagnostics.Debug.WriteLine(row);
            
End If;     
        
End For;
    
End For;
End Sub;

After executing the example the console window displays indexes of header grouping elements if such elements are contained in the table header.

See also:

IPivotTableHeader