IPivotDimensionLevelNumbering.Enable

Syntax

Enable: TriState;

Description

The Enable property determines whether numbering is enabled.

Comments

To get whether numbering is used, use the IPivotDimensionLevelNumbering.IsEnabled property.

Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier. This report should contain a table, which heading includes a dimension that is a dictionary with the 12345 key.

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

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Pivot: IPivot;
    Dim: IPivotDimension;
    LevelNumbering: IPivotDimensionLevelNumbering;
    TopHeader: IPivotHeader;
    Numbering: IPivotHeaderNumbering;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get express report
    Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;  
    // Get table display settings
    Pivot := Express.Pivot;
    // Get dimension by key
    Dim := Pivot.Dimensions.FindByKey(12345);
    // Get numbering settings
    LevelNumbering := Dim.Numbering;
    // Enable numbering in report
    If Not LevelNumbering.IsEnabled Then
        LevelNumbering.Enable := TriState.OnOption;
        TopHeader := Pivot.TopHeader;
        Numbering := TopHeader.Numbering;
        Numbering.IsOn := True;
    End If;
    // Set continuous numbering
    LevelNumbering.Type := PivotDimensionLevelNumberingType.Through;
    // Set numbering separator
    LevelNumbering.Separator := "/";
    // Set numbering format
    LevelNumbering.Format := PivotNumberingFormat.LowercaseLetter;
    // Save changes
    (Express As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the numbering of the dimension in the table heading is executed with specified settings.

See also:

IPivotDimensionLevelNumbering