ValueChangeStyle: ITabCellStyle;
ValueChangeStyle: Prognoz.Platform.Interop.Tab.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.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Pivot;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Eax: IEaxAnalyzer;
Grid: IEaxGrid;
Style: IEaxTableStyle;
CellStyle: ITabCellStyle;
Pivot: IPivot;
Color: GxColorClassClass = New GxColorClassClass();
Begin
Eax := UiErAnalyzerNet1.ErAnalyzer.ErAnalyzer;
Grid := Eax.Grid;
Style := Grid.Style;
// Set data transformation style
CellStyle := Style.ValueChangeStyle;
CellStyle.BackgroundColor := Color.FromName("LightBlue");
CellStyle.CustomFormat := "0,000%";
// Set row data transformation format
Pivot := Eax.Pivot;
Pivot.ValueType := PivotValueType.pvtPercentage;
Pivot.ValueAreaType := PivotValueArea.pvaRow;
End Sub;
See also: