ObtainDataMode: PivotObtainDataMode;
The ObtainDataMode property determines data transformation mode in table.
Transformations are:
Use the PivotObtainDataMode.Normal value of the IPivot.ObtainDataMode property only if cube or time series database is used as a table data source with configured measurement units.
Executing the example requires an express report with the EXPRESS identifier. Report data source is a cube containing dictionary of measurement units.
Add links to the Express, Metabase and Pivot system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Pivot: IPivot;
SortItem: IPivotSortItem;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get table
Pivot := Express.Pivot;
// Enable transformation mode for scaled data
Pivot.ObtainDataMode := PivotObtainDataMode.Normal;
// Remove all data sortings
Pivot.Sorter.Clear;
// Add a table sorting
SortItem := Pivot.Sorter.Add;
// Check if sorting is enabled
If Not Pivot.Sorter.Enabled Then
Pivot.Sorter.Enabled := True;
End If;
// Ascending sorting
SortItem.Direction := PivotSortDirection.Asc;
// Sorting by the first table row
SortItem.Kind := PivotSortKind.Row;
SortItem.IndexInHeader := 0;
// Save changes
Express.RefreshAll;
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example sorting in the first row is applied for scaled data in the express report table.
See also: