Y
yzhshi
Unregistered / Unconfirmed
GUEST, unregistred user!
从基础的来,我贴上一段代码,你实验一下,下面代码需要一个Button,一个QuickReport,里面设置了一个DetailBand,上面放置了一个QrShape.,其Shape属性为qrsVertLine
var
PrintCount: Integer;
procedure TForm1.QuickRep1BeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
begin
PrintCount := 0;
end;
procedure TForm1.QuickRep1NeedData(Sender: TObject; var MoreData: Boolean);
begin
if PrintCount < 5 then
begin
MoreData := True;
DetailBand1.Height := PrintCount * 80;
QRShape1.Height := PrintCount * 40;
PrintCount := PrintCount + 1;
end
else
MoreData := False;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
QuickRep1.Preview;
end;
var
PrintCount: Integer;
procedure TForm1.QuickRep1BeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
begin
PrintCount := 0;
end;
procedure TForm1.QuickRep1NeedData(Sender: TObject; var MoreData: Boolean);
begin
if PrintCount < 5 then
begin
MoreData := True;
DetailBand1.Height := PrintCount * 80;
QRShape1.Height := PrintCount * 40;
PrintCount := PrintCount + 1;
end
else
MoreData := False;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
QuickRep1.Preview;
end;