property OnFormatCell: TEXLReportFormatCellEvent;
TEXLReportFormatCellEvent = procedure(Sender: TObject; Band: TEXLReportBand; RowInTemplate, RowInReport,
ColumnInReport: Integer; Report: ExcelWorksheet; const CellValue: OleVariant) of object;
The OnFormatCell event takes place on building a certain cell in the report.
Parameter Band is the current Advanced Excel Report for RAD Studio band. RowInTemplate shows the tempale row applied to the current cell. RowInReport and ColumnInReport indicate the position of the cell in the result file. Parameter Report contains properties of the result Excel worksheet, and CellValue is the value of the current cell.
It is necessary to consider that in contrast to the OnGetFieldValue and OnSetCellValue events, at the moment of the OnFormatCell rise the position of the current record in Master and Detail datasets is not defined. That means, you can't use the field values of these datasets in the event handler.