Show contents 

Report > Report Assembly Interfaces > IPrxSlice > IPrxSlice.DataSourceTotalsDefined

IPrxSlice.DataSourceTotalsDefined

Syntax

DataSourceTotalsDefined: Boolean;

Description

The DataSourceTotalsDefined property returns True if aggregation is set in the data source of the slice.

Comments

This means aggregation is set directly for a fact of the cube ( server aggregation ). If this aggregation type is not available in the cube, the property returns False.

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.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Report: IPrxReport;
    DIs: IPrxDataIslands;
    DI: IPrxDataIsland;
    Prop: IPrxDataIslandProperties;
    Totals: IPrxDataIslandTotals;
    Dim: IDimInstance;
    DimProp: IPrxDataIslandDimension;
    Slice: IPrxSlice;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("REPORT").Edit;
    Report := MObj As IPrxReport;
    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;
    Slice := Report.DataSources.Item(0).Slices.FindByName("Slice1");
    If Slice.DataSourceTotalsDefined Then
        Totals.MethodFromDataSource := TriState.OnOption;
    End If;
    MObj.Save;
End Sub UserProc;

If aggregation is set directly for the fact in the data source, the method set for the aggregation will be used when calculating totals.

See also:

IPrxSlice