D
denjin98
Unregistered / Unconfirmed
GUEST, unregistred user!
type TForm2 = class(TForm) QuickRep1: TQuickRep; QRLabel1: TQRLabel; QR01: TQRLabel; QR02: TQRLabel; QR03: TQRLabel; QR00: TQRLabel; QR04: TQRLabel; QR05: TQRLabel; QR13: TQRLabel; QR14: TQRLabel; QR15: TQRLabel; QR23: TQRLabel; QR24: TQRLabel; QR25: TQRLabel; QR06: TQRLabel; QR07: TQRLabel; QR08: TQRLabel; QR16: TQRLabel; QR17: TQRLabel; QR18: TQRLabel; QR26: TQRLabel; QR27: TQRLabel; QR28: TQRLabel; QR09: TQRLabel; QR37: TQRLabel; QR38: TQRLabel; QR19: TQRLabel; QR010: TQRLabel; QR011: TQRLabel; QR29: TQRLabel; QR110: TQRLabel; QR111: TQRLabel; QR10: TQRLabel; QR20: TQRLabel; QR30: TQRLabel; QR11: TQRLabel; QR21: TQRLabel; QR31: TQRLabel; QR12: TQRLabel; QR22: TQRLabel; QR32: TQRLabel; QR33: TQRLabel; QR34: TQRLabel; QR35: TQRLabel; QR36: TQRLabel; QR39: TQRLabel; QR210: TQRLabel; QR310: TQRLabel; QR211: TQRLabel; QR311: TQRLabel;......... for j:=0 to 11 do begin Form2.qr+str(k)+str(j).Caption:='固定资产'; Form2.QR+str(k+1)+str(j).Caption:='资产编号:'+ExcelApp.activesheet.cells.item[i+j,6].text+'日期:'+ExcelApp.activesheet.cells.item[i+j,14].text;Form2.QR+str(k+2)+str(j).Caption:='型号:'+ExcelApp.activesheet.cells.item[i+j,8].text+' '+ExcelApp.activesheet.cells.item[i+j,9].text;Form2.QR+str(k+3)+str(j).Caption:='地点:'+ExcelApp.activesheet.cells.item[i+j,20].text+ExcelApp.activesheet.cells.item[i+j,21].text; end; i:=i+12; Form2.QuickRep1.Preview; end;我是想用循环语句实现对FORM2的 QR00....QR311等48个TQRLabel变量赋值但报未定义的变量错,不知怎样用 Form2.qr+str(k)+str(j).Caption:='固定资产';(K:=0,J:=0时)来实现Form2.qr00.Caption:='固定资产';的赋值. 请指教!