IPivotEvaluatorTotals.PlaceBeforeData

Fore Syntax

PlaceBeforeData: Boolean;

Fore.NET Syntax

PlaceBeforeData: boolean;

Description

The PlaceBeforeData property determines whether to output totals before data.

Comments

Available values:

Fore Example

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.

Fore.NET Example

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:

IPivotEvaluatorTotals