|
我要在quickrep中動態的創建qrlabel,可總是出錯,為什麼??求教....
代碼如下:
procedure TARPD00.QRBand4BeforePrint(Sender: TQRCustomBand;
var PrintBand: Boolean);
var qrlabel:TQRLabel;
i:integer;
begin
for i:=1 to 23 do
begin
if strtofloat(temp[i][3])>0 then
begin
qrlabel:=TQRLabel.Create(self);
qrlabel.Parent:=ARPD00.QRBand4;
qrlabel.Left:=0;
qrlabel.Top:=count;
qrlabel.Height:=17;
qrlabel.AutoSize:=true;
qrlabel.Caption:=temp[i][2]+' '+temp[i][3];
count:=count+20;
end;
end;
end; |
|