IPivotEvaluatorTotals.DataSourceTotalsDefined

Syntax

DataSourceTotalsDefined: Boolean;

Description

The DataSourceTotalsDefined property returns whether there is the configured aggregation for data source facts.

Comments

The property returns True if an aggregation calculated on the server is set for data source facts. Any method, except for Count and CountDistinct, is used for aggregation.

Add a result with the PivotEvaluatorElementType.DataSource type to include aggregated data as a result that is calculated in the table.

Example

Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier.

Sub Main;

Var

MB: IMetabase;

OLAP: IEaxAnalyzer;

Pivot: IPivot;

Totals: IPivotEvaluatorTotals;

Begin

MB := MetabaseClass.Active;

OLAP := MB.ItemById("EXPRESS_REPORT").Edit As IEaxAnalyzer;

Pivot := OLAP.Pivot;

Totals := Pivot.Evaluator.Totals;

If Totals.DataSourceTotalsDefined Then

Totals.RowTypes := Totals.RowTypes + PivotEvaluatorElementType.DataSource;

End If;

Pivot.Refresh;

(OLAP As IMetabaseObject).Save;

End Sub Main;

After executing the example a list of results that are calculated in express report is changed. If there are server aggregation settings for express report data source facts, a total is included into the list of totals that are calculated in express report by rows. The method of total result calculation corresponds with the method that is set in aggregation settings for data source facts.

See also:

IPivotEvaluatorTotals