BCBHZ1.PRG
资源名称:jq_report.ARJ [点击查看]
上传用户:xue7720
上传日期:2013-01-31
资源大小:1240k
文件大小:2k
源码类别:
行业应用
开发平台:
VFP
- ***快速汇总方式
- clos data
- use hzdw
- count all to jsq
- use
- set path to C:
- if cd1=1
- ! copy jqbbbcmxb.dbf bcmxbhz.dbf >nul
- else
- pd=cd1-1
- pd=str(pd,2,0)
- x=str(Ryear,4,0)
- pd=ltrim(pd)
- pd='m'+pd
- x1="jqbb"+x+""+pd+"bcmxbhz.dbf"
- *x1="'"+x1+"'"
- if file(x1)
- ! copy jqbb&x&pdbcmxbhz.dbf >nul
- else
- ! copy jqbbbcmxb.dbf bcmxbhz.dbf >nul
- endif
- endif
- if cd1=jsq
- ! copy jqbbbcmxb.dbf bcmxbhz.dbf >nul
- endif
- set path to jqbb
- ****************************
- set colo to /3
- *use xtsz
- kshz='1'
- clos all
- set colo to
- @ 10,22 clea to 14,65
- set colo to w+/3
- @ 8,20 clea to 12,60
- @ 9,30 say '正在汇总补充明细表!'
- @ 10 ,35 say '请稍候......'
- pd1=1
- do whil pd1<=jsq
- if pd1>9
- pd=str(pd1,2,1)
- else
- pd=str(pd1,1,1)
- endif
- pd='bcmxb'+pd
- if file(pd+'.dbf')
- pd1=pd1+1
- else
- @ 20,30 say pd+'表不存在!'
- i=inkey(0)
- set colo to w+/n
- @ 1,1,22,78 box'鞍鞍鞍鞍鞍鞍鞍'
- retu
- endif
- enddo
- *************
- eras bcmxbhzk.dbf
- copy file bcmxbhz.dbf to bcmxbhzk.dbf
- eras bcmxbhz1.dbf
- copy file bcmxbhz.dbf to bcmxbhz1.dbf
- sele 1
- use bcmxbhz1
- *set inde to bcmxb
- 12
- pd2=ljs2
- repl all bys1 with 0,bys2 with 0
- repl all ljs1 with 0,ljs2 with 0
- *rein
- pd1=1
- do whil pd1<=jsq
- if pd1>9
- pd=str(pd1,2,1)
- else
- pd=str(pd1,1,1)
- endif
- sele 2
- pd='bcmxb'+pd
- use &pd
- *set inde to bcmxb
- reinde
- sele 1
- upda on h1 from &pd repl bys1 with bys1+&pd->bys1
- upda on h1 from &pd repl ljs1 with ljs1+&pd->ljs1
- upda on h1 from &pd repl bys2 with bys2+&pd->bys2
- upda on h1 from &pd repl ljs2 with bys2+&pd->ljs2
- pd1=pd1+1
- enddo
- sele 1
- use bcmxbhz
- *set inde to bcb
- *rein
- if cd1<>12
- repl all bys1 with 0,bys2 with 0
- endif
- sele 2
- use bcmxbhz1
- *set inde to cwbcb1
- *rein
- sele 1
- if cd1<>12
- upda on h1 from bcmxbhz1 repl bys1 with bcmxbhz1->bys1
- upda on h1 from bcmxbhz1 repl bys2 with bcmxbhz1->bys2
- repl all ljs1 with bys1+ljs1
- repl all ljs2 with bys2+ljs2
- 12
- repl ljs2 with pd2
- endif
- **********
- @ 8,20 clea to 12,60
- ?? chr(7)
- @ 15,30 say '汇总完毕,按任键返回!'
- i=inkey(0)
- set colo to w+/n
- @ 1,1,22,78 box'鞍鞍鞍鞍鞍鞍鞍'
- clos data
- retu