PivotSlice: IEaxDataAreaPivotSlice;
PivotSlice: Prognoz.Platform.Interop.Express.IEaxDataAreaPivotSlice;
The PivotSlice property returns slice of the table built on multydimensional source.
To get dimension of the table built on multidimensional data source, use IEaxPivotDimensionInstance.PivotDimension.
Executing the example requires that the repository contains an express report with the EXPRESS identifier containing table.
Add links to the Dimesnions, Express, Metabase, Pivot system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Analyzer: IEaxAnalyzer;
DA: IEaxDataArea;
Slice: IEaxDataAreaSlice;
PivotDimKey: Integer;
DimensionInst: IEaxDimensionInstance;
PivDimInst: IEaxPivotDimensionInstance;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Analyzer := MB.ItemById("EXPRESS").Bind As IEaxAnalyzer;
// Get data area
DA := Analyzer.DataArea;
// Get data slice
Slice := DA.Slices.Item(0);
// Get dimension key
PivotDimKey := Analyzer.Pivot.DimItem(3).Key;
// Get dimension data by key
DimensionInst := Slice.GetDimension(PivotDimKey);
// Get description of dimension data source
PivDimInst := DimensionInst As IEaxPivotDimensionInstance;
// Display to the console dimension name and table displaying mode
Debug.WriteLine("Dimension name - " + PivDimInst.PivotDimension.DimInstance.Name);
Select Case PivDimInst.PivotSlice.Pivot.ViewMode As Integer
Case 0: Debug.WriteLine("Table displaying mode - DimInSlot");
Case 1: Debug.WriteLine("Table displaying mode - LevInSlot");
Case 2: Debug.WriteLine("Table displaying mode - Default");
End Select;
End Sub UserProc;
After executing the example, the console displays dimension name and table displaying mode.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Pivot;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Analyzer: IEaxAnalyzer;
DA: IEaxDataArea;
Slice: IEaxDataAreaSlice;
PivotDimKey: uinteger;
DimensionInst: IEaxDimensionInstance;
PivDimInst: IEaxPivotDimensionInstance;
Begin
// Get repository
MB := Params.Metabase;
// Get express report
Analyzer := MB.ItemById["EXPRESS"].Bind() As IEaxAnalyzer;
// Get data area
DA := Analyzer.DataArea;
// Get data slice
Slice := DA.Slices.Item[0];
// Get dimension key
PivotDimKey := Analyzer.Pivot.DimItem[3].Key;
// Get dimension data by key
DimensionInst := Slice.GetDimension(PivotDimKey);
// Get description of dimension data source
PivDimInst := DimensionInst As IEaxPivotDimensionInstance;
// Display to the console dimension name and table displaying mode
System.Diagnostics.Debug.WriteLine("Dimension name - " + PivDimInst.PivotDimension.DimInstance.Name);
Select Case PivDimInst.PivotSlice.Pivot.ViewMode As Integer
Case 0: System.Diagnostics.Debug.WriteLine("Table displaying mode - DimInSlot");
Case 1: System.Diagnostics.Debug.WriteLine("Table displaying mode - LevInSlot");
Case 2: System.Diagnostics.Debug.WriteLine("Table displaying mode - Default");
End Select;
End Sub;
See also: