DataSourceTotalsDefined: Boolean;
The DataSourceTotalsDefined property returns True if aggregation is set in the data source of the slice. 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.
The following example assumes that there is the Report object of the IPrxReport type. The regular report must contain a data area with the DATAISLAND identifier.
Sub UserProc;
Var
Report: IPrxReport;
DIs: IPrxDataIslands;
DI: IPrxDataIsland;
Prop: IPrxDataIslandProperties;
Totals : IPrxDataIslandTotals;
Dim : IDimInstance;
DimProp : IPrxDataIslandDimension;
Slice: IPrxSlice;
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;
Slice := Report.DataSources.Item(0).Slices.FindByName("Slice1");
If Slice.DataSourceTotalsDefined Then
Totals.MethodFromDataSource := TriState.OnOption;
End If;
DI.Save;
End Sub UserProc;
If aggregation is set directly for the fact in the data source, the method set for the aggregation is to be used when calculating totals.
See also: