IPrxDataIslandTotals.Totals

Syntax

Totals: TriState;

Description

The Totals property determines the state of the Totals option. This option enables the user to display totals in rows or columns based on the values of the data areas.

The option is disabled by default.

Example

The following example assumes that there is the Report object with the IPrxReport type.

Sub UserProc;

Var

Report: IPrxReport;

DIs: IPrxDataIslands;

DI: IPrxDataIsland;

Prop: IPrxDataIslandProperties;

Dim : IDimInstance;

DimProp : IPrxDataIslandDimension;

Totals : IPrxDataIslandTotals;

StyleH : IPrxCellStyle;

Font : ITabFont;

Begin

DIs := Report.DataIslands;

DI := DIs.Item(0).Edit;

    Prop := DI.Properties;

    Dim := DI.Slice.LeftHeader.Item(0).Dimension;

    DimProp := Prop.Dimension(Dim.Dimension);

    Totals := DimProp.HierarchyTotals;

    Totals.Totals := TriState.OnOption;

    Totals.Method := BasicAggregatorOperation.Sum;

    StyleH := Totals.Style.Header;

    StyleH.BackgroundColor := New GxColor.CreateRGB(255,0,0);

    Font := StyleH.Font;

    Font.Bold := TriState.OnOption;

    Font.Color := New GxColor.CreateRGB(0,0,255);

DI.Save;

End Sub UserProc;

After executing the example hierarchical totals are set up and displayed for the dimension located in rows.

See also:

IPrxDataIslandTotals