private
labeljump : integer;
linecount : integer;
....
procedure Treport.Button3Click(Sender: TObject);
begin
labeljump := 5;
data.reportQuery.Open;
datasetLabels.RangeEndCount := (data.reportQuery.RecordCount + labeljump);
main.frxReport1.Clear;
main.frxReport1.DataSet := datasetLabels;
main.frxReport1.LoadFromFile(reportPath + '
test.fr3');
SetVariables();
main.frxReport1.ShowReport(true);
end;
procedure Treport.datasetLabelsCheckEOF(Sender: TObject;
var Eof: Boolean);
begin
Eof := linecount >= (data.reportQuery.RecordCount + labeljump)
end;
procedure Treport.datasetLabelsFirst(Sender: TObject);
begin
linecount := 0;
end;
procedure Treport.datasetLabelsNext(Sender: TObject);
begin
inc(linecount);
end;
procedure Treport.datasetLabelsPrior(Sender: TObject);
begin
dec(linecount);
end;
procedure Treport.datasetLabelsGetValue(
const VarName:
string;
var Value: Variant);
begin
if datasetLabels.RecNo > labeljump
then
begin
if VarName = '
id'
then Value := data.reportQuery.FieldByName('
id').AsInteger;
if VarName = '
lastname'
then Value := data.reportQuery.FieldByName('
lastname').AsString;
...
end;
end;