DataSourceTotalsDefined: Boolean;
The DataSourceTotalsDefined property determines whether aggregation is enabled in a data source of the slice.
It returns True if there is aggregation set up for cube fact in the data source of the slice (server aggregation). If the cube does not have such an aggregation, the property returns False.
Executing the example requires a form with the Button1 button, a regular report with the REPORT identifier, which contains a data area. Add links to the Metabase, Report, Ui system assemblies. The example is an event handler for the Button1 button.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
MObj: IMetabaseObject;
DI: IPrxDataIsland;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("REPORT").Bind;
DI := (MObj As IPrxReport).DataIslands.Item(0);
// Display a message with the property value.
If DI.DataSourceTotalsDefined Then
WinApplication.InformationBox("Aggregation is set up in the data source", self As IWin32Window);
Else
WinApplication.InformationBox("Aggregation is not set up in the data source", self As IWin32Window);
End If;
End Sub Button1OnClick;
After executing the example, clicking the button displays a message with information about aggregation in the data source of the first data area of the REPORT regular report.
See also: