IPivotDimNamings.CustomNaming

Syntax

CustomNaming: IPivotCustomDimNaming;

Description

The CustomNaming property returns user name of dimension element.

Comments

To get the number of names in collection, use the IPivotDimNamings.Count property.

Example

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

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

Sub UserProc;
Var
    Metabase: IMetabase;
    Analyzer: IEaxAnalyzer;
    Pivot: IPivot;
    PivotDim: IPivotDimension;
    Namings: IPivotDimNamings;
    CustomNaming: IPivotCustomDimNaming;
Begin
    Metabase := MetabaseClass.Active;
    Analyzer := Metabase.ItemById("EXPRESS").Bind As IEaxAnalyzer;
    // Get express report table:
    Pivot := Analyzer.Pivot;
    // Consider dimension:
    PivotDim := Pivot.Dimensions.Item(3);
    // Collection of dimension names:
    Namings := PivotDim.Namings;
    // Set up custom names and output results:
    CustomNaming := Namings.CustomNaming;
    CustomNaming.Enabled := True;
    CustomNaming.Expression := "%ID% - %NAME%";
    Debug.WriteLine("Name of selected dimension: " + CustomNaming.Dimension.Name);
    Debug.WriteLine("Assigned custom name of the first element: " + CustomNaming.ElementName(0));
End Sub UserProc;

After executing the example the console window displays:

See also:

IPivotDimNamings