GetStyleSettings(Value: IDataAreaHeaderStyleSettingsBase): IEaxDataAreaCellStyle;
Value. Header element, for which display settings should be obtained.
The GetStyleSettings property returns style formatting settings for the specified header element.
The following elements can be specified as value of the Value parameter:
Dimension header described by the IPivotDimension interface.
Dimension level header described by the IPivotDimensionLevel interface.
Data area header described by the IPivotHeader interface.
Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier. The data source calendar dimension has the CALENDAR identifier and is located in columns in the report Link the Drawing, Express, System, Metabase, Pivot, Tab system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Pivot: IPivot;
PivotDim: IPivotDimension;
Grid: IEaxGrid;
CellStyle: IEaxDataAreaCellStyle;
HeaderStyle: ITabCellStyle;
DimKey: Integer;
Begin
MB := MetabaseClass.Active;
// Express report
Express := MB.ItemById("EXPRESS_REPORT").Edit As IEaxAnalyzer;
Pivot := Express.Pivot;
// Calendar dimension
DimKey := Pivot.Selection.FindById("CALENDAR").Dimension.Key;
PivotDim := Pivot.Dimensions.FindByKey(DimKey);
Grid := Express.Grid;
CellStyle := Grid.ViewSettings.GetStyleSettings(PivotDim As IDataAreaHeaderStyleSettingsBase);
// Formatting style
HeaderStyle := Grid.Style.TopHeaderStyle;
HeaderStyle.Font.Bold := TriState.OnOption;
HeaderStyle.BackgroundBrush := New GxSolidBrush.Create(GxColor.FromKnownColor(GxKnownColor.YellowGreen));
// Apply style
CellStyle.Header := HeaderStyle;
// Save report
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the formatting style will be changed for cells placed in the column titles of the express report.
See also: