PlaceBeforeData: Boolean;
PlaceBeforeData: boolean;
The PlaceBeforeData property determines whether to output totals before data.
Available values:
True. Totals are output before data.
False. Default. Totals are output after data.
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;
Totals: IPivotEvaluatorTotals;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get display settings of report data table
Pivot := Express.Pivot;
// Get collection of table totals
Totals := Pivot.Evaluator.Totals;
// Set type of totals calculated by rows
Totals.RowTypes := PivotEvaluatorElementType.Sum;
// Enable calculation of totals by hierarchy
Totals.HierarchyTotals := True;
// Disable calculation of totals by dimension levels
Totals.LevelTotals := False;
// Place totals before dimension elements
Totals.PlaceBeforeData := True;
// Save changes
(Express As IMetabaseObject).Save;
End Sub USerProc;
After executing the example totals are calculated by rows in the table. Calculation is executed by hierarchy. Totals are displayed before data cells.
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;
Totals: IPivotEvaluatorTotals;
Begin
// Get repository
MB := Params.Metabase;
// Get express report
Express := MB.ItemById["EXPRESS"].Edit() As IEaxAnalyzer;
// Get display settings of report data table
Pivot := Express.Pivot;
// Get collection of table totals
Totals := Pivot.Evaluator.Totals;
// Set type of totals calculated by rows
Totals.RowTypes := PivotEvaluatorElementType.peetSum As Integer;
// Enable calculation of totals by hierarchy
Totals.HierarchyTotals := True;
// Disable calculation of totals by dimension levels
Totals.LevelTotals := False;
// Place totals before dimension elements
Totals.PlaceBeforeData := True;
// Save changes
(Express As IMetabaseObject).Save();
End Sub;
See also: