当前位置: 代码迷 >> PB >> 急单位用报表,该怎么处理
  详细解决方案

急单位用报表,该怎么处理

热度:179   发布时间:2016-04-29 09:11:41.0
急!单位用报表
dw_2.reset()
int li_cs,li_fphm,i,end1
Long ll_row,ll_rowcount,ll_ghrc,ll_ghje,ll_czgh,ll_brxz,ll_cfs
dec ld_cfe
string ls_sle,ls_slt,ls_ygxm,ls_brxz,ls_brxzxm,ls_fphm,a,b,ls_brxm,ls_ysdm
datetime ld_begin,ld_end,ld_date
long ll_column,curr,ll_cs,ll_xh
string ls_column_name

ll_column=this.getcolumn()
curr=this.getrow()
ls_ysdm =dw_1.getitemstring(curr,"ysdm")
ld_begin = datetime(date(em_1.text),time("00.00.00"))
ld_end = datetime(date(em_2.text),time("23.59.59"))
ll_cs =dw_1.getitemnumber(curr,"cfs")

if ddlb_2.text='新农合' then
ll_brxz = 6000
else 
ll_brxz = 1000
end if 
ll_xh =1
declare lur_brxm cursor for 
select MS_CF01.brxm,MS_CF01.fphm 
from MS_CF01, MS_MZXX 
where MS_MZXX.BRID = MS_CF01.BRID and kfrq>= :ld_begin and kfrq<= :ld_end and ms_cf01.ysdm=:ls_ysdm and fyck=1 and MS_MZXX.brxz=:ll_brxz and MS_MZXX.sjfp = MS_CF01.fphm and MS_MZXX.zfpb=0;

open lur_brxm;

do 
fetch lur_brxm into :ls_brxm, :ls_fphm ;
if sqlca.sqlcode =0 then

dw_2.object.brxm[ll_xh] = ls_brxm
dw_2.object.fphm[ll_xh] = ls_fphm
if ll_xh >= 2 then

for i = 1 to ll_xh -1
if dw_2.object.fphm[ll_xh] =dw_2.object.fphm[i] then 
messagebox("","发现重复发票")
dw_2.deleterow(i)
end if 

  next
end if
end if 
ll_xh+=1
loop while sqlca.sqlcode =0
close lur_brxm ;

如果有两张重复发票可以删除一张,可是多于3张就程序报错了
错误信息:error accessing external object property fphm at line 39 in doublecliked event of object dw_1 of w_report_maysgzcx.


------解决方案--------------------
for i = 1 to ll_xh -1
if ls_fphm = dw_2.object.fphm[i] then
  相关解决方案