IEaxGridHeaderSettings.TotalStyle

Syntax

TotalStyle: IEaxDataAreaCellStyle;

Description

The TotalStyle property determines style for header totals.

Comments

To set up header placement, use the IEaxGridHeaderSettings.Placement property.

Example

Executing the example requires that repository contains the EAX_HEADER_SETT express report including the totals by rows and by columns.

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

Sub UserProc;
Var
    mb: IMetabase;
    Eax: IEaxAnalyzer;
    Grid: IEaxGrid;
    Pivot: IPivot;
    PivotHeader: IPivotHeader;
    SettBase: IDataAreaHeaderSettingsBase;
    HeaderSettings: IEaxGridHeaderSettings;
    CellSt: IEaxDataAreaCellStyle;
    FormatConditions: ITabFormatConditions;
    FormatCondition: ITabFormatCondition;
    ValFormat: ITabFormatAverage;
    Style: ITabCellStyle;
Begin
    // Get current repository
    mb := MetabaseClass.Active;
    // Get regular report
    Eax := mb.ItemById("EAX_HEADER_SETT").Edit As IEaxAnalyzer;
    // Get display settings of data table
    Pivot := Eax.Pivot;
    // Get table sidehead parameters
    PivotHeader := Pivot.LeftHeader;
    // Get report data table
    Grid := Eax.Grid;
    // Get header formatting parameters
    SettBase := PivotHeader As IDataAreaHeaderSettingsBase;
    HeaderSettings := Grid.ViewSettings.GetViewSettings(SettBase) As IEaxGridHeaderSettings;
    // Get formatting parameters of header totals
    CellSt := HeaderSettings.TotalStyle;
    // Create style and determine its parameters
    Style := New TabCellStyle.Create;
    Style.Font.Color := GxColor.FromName("Blue");
    // Create conditional formatting and set its parameters
    FormatConditions := New TabFormatConditions.Create;
    FormatCondition := FormatConditions.Add;
    FormatCondition.Type := TabConditionType.Average;
    ValFormat := FormatCondition.Details As ITabFormatAverage;
    ValFormat.Style := Style;
    ValFormat.Type := TabFormatAverageType.EqualAbove;
    // Determine that for header total formatting
    /// created style of conditional formatting will be applied
    CellSt.FormatConditions := FormatConditions;
    // Save report
    (Eax As IMetabaseObject).Save;
End Sub UserProc;

After executing the example conditional formatting is set for totals in table headers.

See also:

IEaxGridHeaderSettings