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 Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Expr: IEaxAnalyzer;

Grid: IEaxGrid;

GridStyle: IEaxTableStyle;

Conditions: ITabFormatConditions;

Condition: ITabFormatCondition;

ValFormat: ITabFormatRankValues;

Style: ITabCellStyle;

Begin

//style for conditional format

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;

//The column for which the 80/20 analysis is enabled

Expr.Pivot.ABCColumn := 2;

MObj.Save;

End Sub Main;

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