ValueChangeStyle: ITabCellStyle;
The ValueChangeStyle property determines formatting style of cells with configured transformation.
The transformations are set by the IPivot.ValueType property.
The style is applied only if one of the transformation is set:
Percent.
Growth in percents.
Rate of change in percents.
Executing the example requires the Button, UiErAnalyzer and TabSheetBox components named Button1, UiErAnalyzer1 and TabSheetBox1 correspondingly on the form. For UiErAnalyzer determine express report to the Object property.
Add links to the Pivot, Express, Drawing, Tab system assemblies.
The example is a handler of the OnClick event for the Button1 component.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Eax: IEaxAnalyzer;
Grid: IEaxGrid;
Style: IEaxTableStyle;
CellStyle: ITabCellStyle;
Pivot: IPivot;
Begin
Eax := UiErAnalyzer1.ErAnalyzer;
Grid := Eax.Grid;
Style := Grid.Style;
// Set data transformation style
CellStyle := Style.ValueChangeStyle;
CellStyle.BackgroundColor := GxColor.FromName("LightBlue");
CellStyle.CustomFormat := "0,000%";
// Set row data transformation format
Pivot := Eax.Pivot;
Pivot.ValueType := PivotValueType.Percentage;
Pivot.ValueAreaType := PivotValueArea.Row;
End Sub Button1OnClick;
On the button click, express report data is presented as percentage from total value by rows, with changed cell style.
See also: