IPrxDataIslandTotals.MethodFromDataSource

Syntax

MethodFromDataSource: TriState;

Description

The MethodFromDataSource property determines whether the method that is set for data aggregation in the source should be used to calculate totals. This means aggregation is set directly for a fact of the cube (server aggregation). After this property is set to TriState.OnOption, the totals are calculated using the method that is set in  IStandardCubeFactBinding.AggregationType . If the element is not bound to a standard fact or the method is undefined, the totals are calculated based on the method that is set in IPrxDataIslandTotals.MethodValue (default value is sum).

Example

The following example assumes that there is the Report object of the IPrxReport type. The regular report should contain a data area with the DATAISLAND identifier. Aggregation directly for a fact of cube should be set for the data source of the regular report.

Sub UserProc;

Var

Report: IPrxReport;

DIs: IPrxDataIslands;

DI: IPrxDataIsland;

Prop: IPrxDataIslandProperties;

Totals : IPrxDataIslandTotals;

Dim : IDimInstance;

DimProp : IPrxDataIslandDimension;

Begin

DIs := Report.DataIslands;

DI:= DIs.FindById("DATAISLAND").Edit;

    Prop := DI.Properties;

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

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

    Totals := DimProp.LevelTotals;

    Totals.Totals := TriState.OnOption;

    Totals.MethodFromDataSource := TriState.OnOption;

DI.Save;

End Sub UserProc;

After executing the example totals calculated depending on aggregation settings of the cube fact are displayed for the data area.

See also:

IPrxDataIslandTotals