IPivotHighlightItems.Add

Syntax

Add: IPivotHighlightItem;

Description

The Add method creates a new table data highlighting condition.

Example

Executing the example requires a form with the Button1 button, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1, which is used as a data source for TabSheetBox.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    OLAP: IEaxAnalyzer;
    Pivot: IPivot;
    Table: IPivotTable;
    HighItems: IPivotHighlightItems;
    HighItem: IPivotHighlightItem;
Begin
    OLAP := UiErAnalyzer1.ErAnalyzer;
    Pivot := OLAP.Pivot;
    Table := Pivot.ObtainTable;
    HighItems := Pivot.Highlight;
    HighItem := HighItems.Add;
    HighItem.ConditionType := PivotHighlightType.ALargest;
    HighItem.ConditionValueA := 3;
    HighItem.Area := PivotFilterArea.Table;
    HighItem.Enabled := True;
    OLAP.Grid.ApplyHighlight(HighItem);
End Sub Button1OnClick;

After executing the example clicking the button creates a new condition of data highlighting in the table of the express report loaded to the UiErAnalyzer1 component. Cells containing three maximum values are highlighted.

See also:

IPivotHighlightItems