Namings: IPivotDimNamings;
Namings: Prognoz.Platform.Interop.Pivot.IPivotDimNamings;
The Namings property returns the collection of element names.
To work with names of dimension elements, use the IPivotDimNaming.Expression property.
Executing the example requires that the repository contains an express report with the EXPRESS identifier. The report contains a table.
Add links to the Express, Metabase, and Pivot system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Pivot: IPivot;
Dim: IPivotDimension;
Namings: IPivotDimNamings;
Naming: IPivotCustomDimNaming;
Expression: String;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS").Bind As IEaxAnalyzer;
// Get display settings of report data table
Pivot := Express.Pivot;
// Get specified dimension
Dim := Pivot.Dimensions.Item(0);
// Get collection of dimension names
Namings := Dim.Namings;
// Get custom dimension name
Naming := Namings.CustomNaming;
// Get expression of name and output it to console window
Expression := Naming.Expression;
If Expression.Length = 0 Then
Debug.WriteLine("Expression is not set") Else
Debug.WriteLine("Expression - " + Expression);
End If;
End Sub UserProc;
After executing the example the console window displays expression of first dimension element name.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Pivot;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Pivot: IPivot;
Dim: IPivotDimension;
Namings: IPivotDimNamings;
Naming: IPivotCustomDimNaming;
Expression: String;
Begin
// Get repository
MB := Params.Metabase;
// Get express report
Express := MB.ItemById["EXPRESS"].Bind() As IEaxAnalyzer;
// Get display settings of report data table
Pivot := Express.Pivot;
// Get specified dimension
Dim := Pivot.Dimensions.Item[0];
// Get collection of dimension names
Namings := Dim.Namings;
// Get custom dimension name
Naming := Namings.CustomNaming;
// Get expression of name and output it to console window
Expression := Naming.Expression;
If Expression.Length = 0 Then
System.Diagnostics.Debug.WriteLine("Expression is not set") Else
System.Diagnostics.Debug.WriteLine("Expression - " + Expression);
End If;
End Sub;
See also: