Setting Up Table Data Displaying

Consider an example of getting a basis for building a table and setting up express report table data display.

Executing the example requires that the repository contains an express report with the EXPRESS identifier, which data source is a standard cube.

Example

Add links to the Express, Metabase, and Pivot system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Pivot: IPivot;
    Totals: IPivotEvaluatorTotals;
    HighItem: IPivotHighlightItem;
    Filter: IPivotFilterSettings;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get express report
    Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    Pivot := Express.Pivot;
    //Totals
    Totals := Pivot.Evaluator.Totals;
    Totals.RowTypes := PivotEvaluatorElementType.Sum + PivotEvaluatorElementType.Max;
    Totals.IncludeOwner := True;
    Totals.TreatEmptyAsZero := False;
    //Highlight data in the range [10;20]
    HighItem := Pivot.Highlight.Add;
    HighItem.ConditionType := PivotHighlightType.NLAandNGB;
    HighItem.ConditionValueA := 10;
    HighItem.ConditionValueB := 20;
    HighItem.Area := PivotFilterArea.Table;
    HighItem.Enabled := True;
    //Filter data
    Filter := Pivot.Filter As IPivotFilterSettings;
    Filter.Enabled := True;
    Filter.UseCondition := True;
    Filter.ConditionType := PivotFilterType.NEqA;
    Filter.ConditionValueA := 25;
    // Save changes
    (Express As IMetabaseObject).Save;
End Sub UserProc;

After executing the example express report table displays totals, highlighted data in the range [10;20], values not equal to 25 are filtered.

See also:

General Principles of Programming Using the Pivot Assembly