Levels: IPivotDimensionLevels;
Levels: Prognoz.Platform.Interop.Pivot.IPivotDimensionLevels;
The property returns the collection of dimension levels.
To get the required dimension level, use IPivotDimensionLevels.Item.
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;
Levels: IPivotDimensionLevels;
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 dimension from collection
Dim := Pivot.Dimensions.Item(0);
// Get collection of dimension levels and output the number of them to console window
Levels := Dim.Levels;
Debug.WriteLine("Number of dimension levels = " + Levels.Count.ToString);
End Sub UserProc;
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;
Levels: IPivotDimensionLevels;
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 dimension from collection
Dim := Pivot.Dimensions.Item[0];
// Get collection of dimension levels and output the number of them to console window
Levels := Dim.Levels;
System.Diagnostics.Debug.WriteLine("Number of dimension levels = " + Levels.Count.ToString());
End Sub;
See also: