VFP 实现批量查询,并打印出来,求助
IF DODEFAULT()=.F.RETURN .F.
ENDIF
cydno1 = ""
cydno1 = runform2('tm_add_print_no', 1, '开始运单号', 'tm_yd', 'yd_no')
cydno1 = IIF(VARTYPE(cydno1)="L", '', cydno1)
IF EMPTY(cydno1)
RETURN
ENDIF
cydno2 = ""
cydno2 = runform2('tm_add_print_no', 1, '结束运单号', 'tm_yd', 'yd_no')
cydno2 = IIF(VARTYPE(cydno2)="L", '', cydno2)
IF EMPTY(cydno2)
RETURN
ENDIF
FOR cydno=cydno1 TO cydno2
cydno=cydno+1
SELECT * FROM bas_dept INTO CURSOR tmp_dept READWRITE
thisform.at_find_zb(, cydno)
thisform.at_find_mx_other_cost(, cydno)
thisform.chkisupdate.caption = "更新发货人和收货人信息"
thisform.chkisupdate.value = 0
thisform.is_edit_nosave = .F.
thisform.lablrecaddr.caption = ALLTRIM(cur_tm_yd.addr_dis)+ALLTRIM(cur_tm_yd.addr_town)
*!* thisform.txtrecieveaddrhn.left = thisform.lablrecaddr.left+thisform.lablrecaddr.width+10
*!* IF thisform.txtrecieveaddrhn.width+thisform.txtrecieveaddrhn.left>
*!* thisform.txtrecieveaddrhn.width = thisform.txtrecieveaddrhn.width-thisform.lablrecaddr.width
*!* ENDIF
thisform.lablrecaddr.refresh()
thisform.at_control
thisform.txtlabelnum.value = cur_tm_yd.qty
thisform.txtlabelnum.refresh
IF USED("cur_cube")
USE IN cur_cube
ENDIF
thisform.refresh
SELECT * FROM cur_tm_yd INTO CURSOR cur_tm_yd_bak READWRITE
thisform.is_modi_mx = .F.
thisform.Print
ENDFOR