有Quickerep1,QrBand1 (BandType:=rbDetail),Qrlable1-4,ListView1(比如下有三个子项)
var
CurrentItem :integer;
procedure TForm1.QuickRep1BeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
begin
CurrentItem:=0;
end;
procedure TForm1.QuickRep1NeedData(Sender: TObject;
var MoreData: Boolean);
begin
if CurrentItem<ListView1.Items.count then
begin
QrLabel1.caption:=ListView1.items[CurrentItem].caption;
QrLabel2.caption:=ListView1.items[CurrentItem].SubItems[1];
QrLabel3.caption:=ListView1.items[CurrentItem].subItems[0];
QrLabel4.caption:=ListView1.items[CurrentItem].subItems[2];
end;
inc(CurrentItem);
MoreData:=CurrentItem<=ListView1.Items.count;
end;