IEaxTableStyle.ABCBottomStyle

Syntax

ABCBottomStyle: ITabCellStyle;

Description

The ABCBottomStyle property determines a style of cells with minimum values of column or row on using the Top/Bottom analysis.

Comments

To determines a style of cells with maximum values of column or row, use the IEaxTableStyle.ABCTopStyle property.

Example

Executing the example requires that the repository contains an express report with the EXPRESS_IPIVOTPARETOSETTENGSITEM identifier that contains a table.

Add links to the Drawing, Express, Metabase, Pivot, Tab system assemblies.

Sub UserProc;
Var
    Metabase: IMetabase;
    Analyzer: IEaxAnalyzer;
    Pivot: IPivot;
    ColumnSettings: IPivotParetoSettings;
    BottomSettings: IPivotParetoSettingsItem;
    TopSettings: IPivotParetoSettingsItem;
    Grid: IEaxGrid;
    Style: IEaxTableStyle;
    AbcTopStyle: ITabCellStyle;
    AbcBottomStyle: ITabCellStyle;
    TopBrush: GxSolidBrush;
    BottomBrush: GxSolidBrush;
    TopColor: IGxColor;
    BottomColor: IGxColor;
Begin
    // Get repository
    Metabase := MetabaseClass.Active;
    // Get express report
    Analyzer := Metabase.ItemById("EXPRESS_IPIVOTPARETOSETTENGSITEM").Edit As IEaxAnalyzer;
    // Get express report table
    Pivot := Analyzer.Pivot;
    // Apply the 80/20 analysis to columns
    ColumnSettings := Pivot.Pareto.ColumnsSettings;
    // Enable analysis only to the first column
    ColumnSettings.Enabled := True;
    ColumnSettings.ElementIndex := 0;
    // Get maximum values of analyzed column
    TopSettings := ColumnSettings.TopSettings;
    // Change calculation type
    TopSettings.Kind := PivotParetoKind.Count;
    // Enable displaying of cells with maximum values
    TopSettings.Display := True;
    // Change the number of displayed cells with maximum values
    TopSettings.Threshold := 2;
    // Get minimum values of analyzed column
    BottomSettings := ColumnSettings.BottomSettings;
    // Change calculation type
    BottomSettings.Kind := PivotParetoKind.Count;
    // Enable displaying of cells with minimum values
    BottomSettings.Display := True;
    // Change the number of displayed cells with minimum values
    BottomSettings.Threshold := 2;
    // Get report data table
    Grid := Analyzer.Grid;
    // Get table formatting parameters
    Style := Grid.Style;
    // Create and set green color of background for cells with maximum values
    AbcTopStyle := New TabCellStyle.Create;
    TopColor := New GxColor.CreateRGB(01280);
    TopBrush := New GxSolidBrush.Create(TopColor);
    AbcTopStyle.BackgroundBrush := TopBrush;
    Style.ABCTopStyle := AbcTopStyle;
    // Create and set red color of background for cells with minimum values
    AbcBottomStyle := New TabCellStyle.Create;
    BottomColor := New GxColor.CreateRGB(25500);
    BottomBrush := New GxSolidBrush.Create(BottomColor);
    AbcBottomStyle.BackgroundBrush := BottomBrush;
    Style.ABCBottomStyle := AbcBottomStyle;
    // Save changes
    (Analyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the first column of express report table is analyzed by the Top/Bottom analysis according to the set parameters:

See also:

IEaxTableStyle