IPivotDimNamings.CustomNaming

Fore Syntax

CustomNaming: IPivotCustomDimNaming;

Fore.NET Syntax

CustomNaming: Prognoz.Platform.Interop.Pivot.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.

Fore 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:

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

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

Public Shared Sub Main(Params: StartParams);
Var
    Metabase: IMetabase;
    Analyzer: IEaxAnalyzer;
    Pivot: IPivot;
    PivotDim: IPivotDimension;
    Namings: IPivotDimNamings;
    CustomNaming: IPivotCustomDimNaming;
Begin
    Metabase := Params.Metabase;
    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%";
    System.Diagnostics.Debug.WriteLine("Name of selected dimension: " + CustomNaming.Dimension.Name);
    System.Diagnostics.Debug.WriteLine("Assigned custom name of the first element: " + CustomNaming.ElementName[0]);
End Sub;

See also:

IPivotDimNamings