The
NbColumn property is used to get the number of columns in a report. This property is used to find out whether a report is a multi-column report.
// Change the background color of a block according to the column number
// (for a report with 2 columns)
// In the event "Before printing the block"
IF MyReport.NbColumn = 2 THEN
ACurrentColumn is int = iColumnNum()
SWITCH ACurrentColumn
CASE 1:
MySelf.BackgroundColor = LightRed
CASE 2:
MySelf.BackgroundColor = LightGreen
END
END
Syntax
<Result> = <Report used>.NbColumn
<Result>: Integer
Number of columns found in the report.
<Report used>: Report name
Name of the report to be used.
Remarks
- The NbColumn property applies only to reports (and not to controls or blocks in a report).
- The NbColumn property must be used in the code of the events associated with the report.