IPrxDataIslandTotals.Others

Syntax

Others: TriState;

Description

The Others property determines the Show the Other Aggregate option. This option enables the user to calculate totals for the dimension elements not included into the selection. The option is disabled by default.

The example of a table with hierarchical totals not showing the Other aggregate (upper table) and showing the Other aggregate (lower table):

Example

Executing the example assumes that the repository contains a regular report with the OBJ_REPORT identifier. This report should contain a data area.

Sub Main;

Var

MB: IMetabase;

ReportObj: IMetabaseObject;

Report: IPrxReport;

DIs: IPrxDataIslands;

DI: IPrxDataIsland;

Prop: IPrxDataIslandProperties;

Header: IPrxDataIslandHeader;

Totals: IPrxDataIslandTotals;

Begin

MB := MetabaseClass.Active;

ReportObj := MB.ItemById("OBJ_REPORT").Edit;

Report := ReportObj As IPrxReport;

DIs := Report.DataIslands;

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

    Prop := DI.Properties;

    Header := Prop.LeftHeader;

    Totals := Header.HierarchyTotals;

    If Not Totals.HasTotals Then

    Totals.Totals := TriState.OnOption;

    Totals.Method := BasicAggregatorOperation.Sum;

    End If;

    If Not Totals.HasOthers Then

    Totals.Others := TriState.OnOption;

    End If;

DI.Save;

ReportObj.Save;

End Sub Main;

After executing the example the Show the Other Aggregate option is enabled if it was disabled up to that moment.

See also:

IPrxDataIslandTotals