BorderStyle: TabBorderStyle;
The BorderStyle property determines region border line type.
To determine region border color, use the ITabRegion.BorderColor property.
Executing the example requires that the repository contains a regular report with connected unit. The connected unit and the EventsClass class must be specified as event handler.
Add links to the Drawing, Report, Tab system assemblies.
Class EventsClass: ReportEvents
Public Sub OnAfterRecalcSheet(Sheet: IPrxSheet);
Var
Tab: ITabSheet;
Reg: ITabRegion;
Begin
// Get report sheet table
Tab := Sheet.Table;
// Add a region to collection
Reg := Tab.Regions.Add;
// Determine table range where region is located
Reg.Range := Tab.Cells(1, 1, 3, 3);
// Set background color of table region
Reg.BackgroundColor := New GxColor.CreateARGB(64, 255, 0, 0);
// Set border color of table region
Reg.BorderColor := New GxColor.CreateRGB(255, 0, 0);
// Set line type of table region border
Reg.BorderStyle := TabBorderStyle.Double;
// Set line width of table region border
Reg.BorderWeight := TabBorderWeight.Hairline;
// Set visibility of table region
Reg.Visible := True;
// Add the second region to collection
Reg := Tab.Regions.Add;
// Determine the second table range where region is located
Reg.Range := Tab.Cells(2, 2, 4, 4);
// Set formatting of the second table region
Reg.BackgroundColor := New GxColor.CreateARGB(64, 0, 0, 255);
Reg.BorderColor := New GxColor.CreateRGB(0, 0, 255);
Reg.Visible := True;
End Sub OnAfterRecalcSheet;
End Class EventsClass;
After executing the example, on report update two regions will be selected that will have different colors and different borders.
See also: