HotXLS Docs

BeforeRecord property

Occurs before each record is exported, allowing custom validation or skipping of individual dataset records

Syntax

TBeforeRecord = procedure(Sender: TObject; DataSet: TDataSet; Level: Integer; var ExportRecord: Boolean) of object; property BeforeRecord: TBeforeRecord read FBeforeRecord write FBeforeRecord;
Sender TObject. Specifies the TDataToXLS component that triggered the event
DataSet TDataSet. The dataset record that is about to be exported
Level Integer. Zero for the master dataset and larger values for nested detail datasets
ExportRecord Boolean. Set to False to skip the current record; True exports it

Example

This example hooks the BeforeRecord event handler

DataToXLS.BeforeRecord := MyBeforeRecordHandler;