IPrxDataIslandTotals.Method

Syntax

Method: BasicAggregatorOperation;

Description

The Method property determines the method that is used to calculate totals.

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