Show contents 

Express > Express Assembly Interfaces > IEaxGridHeaderSettings > IEaxGridHeaderSettings.TotalStyle

IEaxGridHeaderSettings.TotalStyle

Syntax

TotalStyle: IEaxDataAreaCellStyle;

Description

The TotalStyle property determines style for header totals.

Comments

Use the IEaxGridHeaderSettings.Placement property to determine settings of header layout.

Example

Executing the example requires that the repository contains the EAX_HEADER_SETT express report including row and column totals.

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