Express > Express Assembly Interfaces > IEaxDataAreaPivotSlice > IEaxDataAreaPivotSlice.Pivot
Pivot: IPivot;
The Pivot property returns the object to work with base to build data table.
Executing the example requires:
Regular report with the REPORT identifier containing an analytical data area.
Express report with the EXPRESS identifier containing a table.
Both reports are based on the same data source. Table formatting style is changed in the express report.
Add links to the Dimensions, Express, Metabase, Pivot, Report system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
DataArea: IEaxDataArea;
RepGrid, EaxGrid: IEaxGrid;
PivSlice, Slice: IEaxDataAreaPivotSlice;
Pivot: IPivot;
CombSel: IDimSelection;
Express: IEaxAnalyzer;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get analytical data area of regular report
Report := MB.ItemById("REPORT").Edit As IPrxReport;
DataArea := Report.DataArea;
// Get table data view
RepGrid := DataArea.Views.Item(0) As IEaxGrid;
// Get base for building analytical data area slice
PivSlice := DataArea.Slices.Item(0) As IEaxDataAreaPivotSlice;
// Display the number of dimensions in the console
Pivot := PivSlice.Pivot;
Debug.WriteLine("Number of dimensions = " + Pivot.DimCount.ToString);
// Display metrics dimension selection in the console
CombSel := PivSlice.CombinedIndicatorSelection;
Debug.WriteLine("Metric dimension selection elements = " + CombSel.ToString("", ", ", False));
// Get express report
Express := MB.ItemById("EXPRESS").Bind As IEaxAnalyzer;
// Get base to build slice
Slice := Express.DataArea.Slices.Item(0) As IEaxDataAreaPivotSlice;
// Get express report table
EaxGrid := Express.Grid;
// Apply slice and data view
PivSlice.Apply(Slice, EaxPivotSliceApplyOptions.Default_);
RepGrid.Apply(EaxGrid, EaxGridApplyOptions.Default_);
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the console displays the number of dimensions in the slice, selection elements of metrics dimension. Express report settings are imported to regular report analytical data area.
See also: