调用报表时出现"access violation at dress 0052EF63 in module mainprj.exe. read of addres

  • 主题发起人 主题发起人 leijh001
  • 开始时间 开始时间
L

leijh001

Unregistered / Unconfirmed
GUEST, unregistred user!
调用报表时出现"access violation at dress 0052EF63 in module mainprj.exe. read of address 00000344"(200分)<br />调用部分见下:
leftv:=mainModule1.wchbClient.FieldCount-1;
r:=mainModule1.wchbClient.RecordCount;
zxddyform.biaohaoQRGrid.PRow :=r;
zxddyform.wuchaQRGrid.PCol:=leftv;
zxddyform.wuchaQRGrid.PRow:=r;
zxddyform.wuchaQRGrid.PWidth:=(510/leftv);
zxddyform.xwQRGrid.PCol:=leftv;
zxddyform.xwQRGrid.PWidth:=(510/leftv);
zxddyform.dlbsQRGrid.PCol:=leftv;
zxddyform.dlbsqRGrid.PWidth:=(510/leftv);
with mainModule1.bzrklsmainClientdo
begin
zxddyform.jnameQRLabel.Caption:='局名:'+FieldValues['jname'];
zxddyform.xinghaoQRLabe.Caption:='型号:'+FieldValues['xinghao'];
zxddyform.guigeQRLabe.Caption:='规格:'+FieldValues['dianliu'];
zxddyform.changshuQRLabe.Caption:='常数:'+FieldValues['changshu'];
zxddyform.pinliuQRLabe.Caption:='频率:50Hz';
zxddyform.wenduQRLabe.Caption:='温度:'+FieldValues['wendu'];
zxddyform.xianghaoQRLabe.Caption:='箱号:'+FieldValues['xianghao'];
zxddyform.xingmingQRLabe.Caption:='操作员:'+FieldValues['gonghao'];
zxddyform.shiftQRLabe.Caption:='班次:'+FieldValues['shift'];
zxddyform.gsQRLabe.Caption:='装箱个数:'+inttostr(RecordCount);
zxddyform.zxyQRLabe.Caption:='装箱员:'+trim(edit3.Text);
end;
if xw1<>0 then
begin
zxddyform.glys1QRGrid.PWidth:=xw1*(510/leftv);
zxddyform.glys1QRGrid.Cells[0,0]:='功 率 因 数:='+glys[0];
end;
if xw2<>0 then
begin
zxddyform.glys2QRGrid.Enabled:=true;
zxddyform.glys2QRGrid.Size.Left:=zxddyform.glys1QRGrid.Size.Left+xw1*(510/leftv);
zxddyform.glys2QRGrid.PWidth:=xw2*(510/leftv);
zxddyform.glys2QRGrid.Cells[0,0]:='功 率 因 数:='+glys[1];
end;
if xw3<>0 then
begin
zxddyform.glys2QRGrid.Enabled:=true;
zxddyform.glys2QRGrid.Size.Left:=zxddyform.glys2QRGrid.Size.Left+zxddyform.glys2QRGrid.PWidth;
zxddyform.glys3QRGrid.PWidth:=xw3*(510/leftv);
zxddyform.glys3QRGrid.Cells[0,0]:='功 率 因 数:='+glys[2];
end;
for r:=0 to leftvdo
begin
zxddyform.xwQRGrid.Cells[r,0]:=xw[r];
zxddyform.dlbsQRGrid.Cells[r,0]:=dlbs[r];
end;
zxddyform.QuickRep1.Preview() ;
 
是否是因为你的打印机没有打开导致的?我以前也试过这种情况,当打印机打开就OK了。
 
同意楼上,可能与打印机没有开有关。
 
跟踪一下,这种问题一般是你的程序访问了还没有创建的对象。
 
多人接受答案了。
 
后退
顶部