IEaxTableStyle.ABCFormatConditions

Syntax

ABCFormatConditions: ITabFormatConditions;

Description

The ABCFormatConditions property returns a collection of conditional formats applied to cells of the column with enabled 80/20 analysis.

Example

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

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Expr: IEaxAnalyzer;
    Grid: IEaxGrid;
    GridStyle: IEaxTableStyle;
    Conditions: ITabFormatConditions;
    Condition: ITabFormatCondition;
    ValFormat: ITabFormatRankValues;
    Style: ITabCellStyle;
Begin
    // Conditional format style
    Style := New TabCellStyle.Create;
    Style.BackgroundColor := GxColor.FromName("Red");
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("EXPRESS_REPORT").Edit;
    Expr := MObj As IEaxAnalyzer;
    Grid := Expr.Grid;
    GridStyle := Grid.Style;
    Conditions := GridStyle.ABCFormatConditions;
    Condition := Conditions.Add;
    Condition.Type := TabConditionType.MinMax;
    ValFormat := Condition.Details As ITabFormatRankValues;
    ValFormat.Count := 2;
    ValFormat.Style := Style;
    ValFormat.Type := TabFormatRankType.Top;
    // Column, used for the 80/20 analysis
    Expr.Pivot.ABCColumn := 2;
    MObj.Save;
End Sub UserProc;

After executing the example conditional formatting is added for cells of the column for which the 80/20 analysis is enabled. Analysis is applied to data of the third table column. The cells containing two greatest values are to be highlighted in red.

See also:

IEaxTableStyle|IEaxGrid.Activate8020|80/20 analysis