- 论坛徽章:
- 1
|
农村信用社信贷管理系统
[quote]原帖由 "abist"]能说一下在unix foxpro下如何改字体吗?[/quote 发表:
贴一个打印报表的例子:
- use sydw
- sydwmc=dwmc
- use defaprn
- btd=alltrim(btfd)
- btx=alltrim(btqx)
- lineys=alltrim(ysh)
- lineqx=alltrim(ysqx)
- lx=prtlx
- use xtsetup
- rs=qsrs
- dydh=sfdydh
- rdate=ctod(gzrq)
- use tmp/xcftmp01
- *set safety off
- *copy to tmp/xcftmp for xch=m.dwbh
- *set safety on
- *use tmp/xcftmp
- sum all hqpj to h1
- sum all dqpj to h2
- sum all dhpj to h7
- sum all hqxcf to h3
- sum all dqxcf to h4
- sum all dhxcf to h5
- *sum all hjxcf to h5
- sum all hqdd to z1
- sum all dqdd to z2
- sum all dhdd to z3
- z4=z1+z2+z3
- h6=h1+h2+h7
- h8=h3+h4+h5
- zrs=reccount()
- go top
- define window yw from 6,6 to 10,39 shadow color scheme 5
- activate window yw
- move window yw center
- yn='Y'
- @1,2 say "是否压缩打印?" get yn valid yn$"YyNn" error "只能选择Y或N"
- read
- if yn='Y' .or. yn='y'
- startys=lineys
- else
- startys=lineqx
- endif
- clear
- @1,2 say "每页打印行数:" get rs picture "99" valid rs>;0
- read
- release window yw
- zys=zrs/rs
- if dydh='1'
- LN1=" ┏━━━━━┳━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━┓"
- LN2=" ┃ ┃ ┃ 活 期 ┃ 活 期 ┃ ┃ 定 期 ┃ 定 期 ┃ ┃ 定 活 ┃ 定 活 ┃ ┃ 合 计 ┃ 合 计 ┃ 合 计 ┃ ┃"
- LN2b=" ┃ 子协储号 ┃协储员┃ ┃ ┃ 协 储 费 ┃ ┃ ┃ 协 储 费 ┃ ┃ ┃ 协 储 费 ┃ ┃ ┃ ┃ 签 名 ┃"
- LN2a=" ┃ ┃ ┃ 到达余额 ┃ 平均余额 ┃ ┃ 到达余额 ┃ 平均余额 ┃ ┃ 到达余额 ┃ 平均余额 ┃ ┃ 到达余额 ┃ 平均余额 ┃ 协储费 ┃ ┃"
- LN3=" ┣━━━━━╋━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━┫"
- LN4=" ┗━━━━━┻━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━┛"
- endif
- if dydh='0'
- LN1=" ┏━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━┳━━━━┓"
- LN2=" ┃ ┃ 活 期 ┃ ┃ 定 期 ┃ ┃ 合 计 ┃ 合 计 ┃ ┃"
- LN2b=" ┃ 子协储号 ┃ ┃协 储 费┃ ┃协 储 费┃ ┃ ┃ 签 名 ┃"
- LN2a=" ┃ ┃ 平均余额 ┃ ┃ 平均余额 ┃ ┃ 平均余额 ┃ 协储费 ┃ ┃"
- LN3=" ┣━━━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━╋━━━━┫"
- LN4=" ┗━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━━┻━━━━┻━━━━┛"
- endif
- prtfile=sys(3)
- set device to print
- set print on
- set printer to cat>;tmp/&prtfile
- line=1
- pagenum=1
- do while .not. eof()
- if dydh='1'
- @prow()+1,60 say chr(27)+btd+alltrim(sydwmc)+"协储员子协储号协储费表"+chr(27)+btx
- *@prow()+1,83 say replicate("=",40)
- if lx="L"
- @prow()+1,1 say chr(27)+startys+chr(28)+"S"+chr(0)+chr(0)
- endif
- if lx="O"
- @prow()+1,1 say chr(27)+startys+chr(28)+"$"+chr(6)
- endif
- @prow()+1,1 say ' '
- @prow()+1,5 say "单位:"+dwmc+space(86)+"起止日期:"+dtoc(f_date)+"---"+dtoc(s_date)
- endif
- if dydh='0'
- @prow()+1,35 say chr(27)+btd+alltrim(sydwmc)+"协储费清单"+chr(27)+btx
- @prow()+1,33 say replicate("=",25)
- @prow()+1,1 say chr(27)+startys+chr(28)+"$"+chr(6)
- @prow()+1,5 say "协储员:"+xcy+space(33)+"起止日期:"+dtoc(f_date)+"---"+dtoc(s_date)
- endif
- * xch2=dyxch
- @prow()+1,1 say ln1
- @prow()+1,1 say ln2
- @prow()+1,1 say ln2b
- @prow()+1,1 say ln2a
- for line=1 to rs
- @prow()+1,1 say ln3
- if zxch=0
- if dydh='1'
- @prow()+1,1 say " ┃"+str(xch,6)+" ┃"+substr(xcy,1,6)+"┃"+str(hqdd,10,2)+"┃"+str(hqpj,10,2)+"┃"+str(hqxcf,10,2)+"┃"+str(dqdd,10,2)+"┃"+str(dqpj,10,2)+"┃"+str(dqxcf,10,2)+"┃"+str(dhdd,10,2)+"┃"+str(dhpj,10,2)+"┃"+str(dhxcf,10,2)+"┃"+str(hqdd+dqdd+dhdd,10,2)+"┃"+str(hqpj+dqpj+dhpj,10,2)+"┃"+str(hqxcf+dqxcf+dhxcf,10,2)+"┃ ┃"
- endif
- if dydh='0'
- @prow()+1,1 say " ┃"+str(xch,6)+" ┃"+str(hqpj,10,2)+"┃"+space(8)+"┃"+str(dqpj,10,2)+"┃"+space(8)+"┃"+str(hqpj+dqpj,10,2)+"┃"+space(8)+"┃ ┃"
- endif
- endif
- if zxch>;0 .and. zxch<10
- if dydh='1'
- @prow()+1,1 say " ┃"+str(xch,6)+"-"+alltrim(str(zxch,3))+" ┃"+substr(xcy,1,6)+"┃"+str(hqdd,10,2)+"┃"+str(hqpj,10,2)+"┃"+str(hqxcf,10,2)+"┃"+str(dqdd,10,2)+"┃"+str(dqpj,10,2)+"┃"+str(dqxcf,10,2)+"┃"+str(dhdd,10,2)+"┃"+str(dhpj,10,2)+"┃"+str(dhxcf,10,2)+"┃"+str(hqdd+dqdd+dhdd,10,2)+"┃"+str(hqpj+dqpj+dhpj,10,2)+"┃"+str(hqxcf+dqxcf+dhxcf,10,2)+"┃ ┃"
- endif
- if dydh='0'
- @prow()+1,1 say " ┃"+str(xch,6)+"-"+alltrim(str(zxch,3))+" ┃"+str(hqpj,10,2)+"┃"+space(8)+"┃"+str(dqpj,10,2)+"┃"+space(8)+"┃"+str(hqpj+dqpj,10,2)+"┃"+space(8)+"┃ ┃"
- endif
- endif
- if zxch>;=10 .and. zxch<100
- if dydh='1'
- @prow()+1,1 say " ┃"+str(xch,6)+"-"+alltrim(str(zxch,3))+" ┃"+substr(xcy,1,6)+"┃"+str(hqdd,10,2)+"┃"+str(hqpj,10,2)+"┃"+str(hqxcf,10,2)+"┃"+str(dqdd,10,2)+"┃"+str(dqpj,10,2)+"┃"+str(dqxcf,10,2)+"┃"+str(dhdd,10,2)+"┃"+str(dhpj,10,2)+"┃"+str(dhxcf,10,2)+"┃"+str(hqdd+dqdd+dhdd,10,2)+"┃"+str(hqpj+dqpj+dhpj,10,2)+"┃"+str(hqxcf+dqxcf+dhxcf,10,2)+"┃ ┃"
- endif
- if dydh='0'
- @prow()+1,1 say " ┃"+str(xch,6)+"-"+alltrim(str(zxch,3))+" ┃"+str(hqpj,10,2)+"┃"+space(8)+"┃"+str(dqpj,10,2)+"┃"+space(8)+"┃"+str(hqpj+dqpj,10,2)+"┃"+space(8)+"┃ ┃"
- endif
- endif
- if zxch>;=100
- if dydh='1'
- @prow()+1,1 say " ┃"+str(xch,6)+"-"+alltrim(str(zxch,3))+"┃"+substr(xcy,1,6)+"┃"+str(hqdd,10,2)+"┃"+str(hqpj,10,2)+"┃"+str(hqxcf,10,2)+"┃"+str(dqdd,10,2)+"┃"+str(dqpj,10,2)+"┃"+str(dqxcf,10,2)+"┃"+str(dhdd,10,2)+"┃"+str(dhpj,10,2)+"┃"+str(dhxcf,10,2)+"┃"+str(hqdd+dqdd+dhdd,10,2)+"┃"+str(hqpj+dqpj+dhpj,10,2)+"┃"+str(hqxcf+dqxcf+dhxcf,10,2)+"┃ ┃"
- endif
- if dydh='0'
- @prow()+1,1 say " ┃"+str(xch,6)+"-"+alltrim(str(zxch,3))+"┃"+str(hqpj,10,2)+"┃"+space(8)+"┃"+str(dqpj,10,2)+"┃"+space(8)+"┃"+str(hqpj+dqpj,10,2)+"┃"+space(8)+"┃ ┃"
- endif
- endif
- skip
- if eof()
- @prow()+1,1 say ln3
- if dydh='1'
- @prow()+1,1 say " ┃ 合 计 ┃ ┃"+str(z1,10,2)+"┃"+str(h1,10,2)+"┃"+str(h3,10,2)+"┃"+str(z2,10,2)+"┃"+str(h2,10,2)+"┃"+str(h4,10,2)+"┃"+str(z3,10,2)+"┃"+str(h7,10,2)+"┃"+str(h5,10,2)+"┃"+str(z4,10,2)+"┃"+str(h6,10,2)+"┃"+str(h8,10,2)+"┃ ┃"
- endif
- if dydh='0'
- @prow()+1,1 say " ┃ 合 计 ┃"+str(h1,10,2)+"┃"+space(8)+"┃"+str(h2,10,2)+"┃"+space(8)+"┃"+str(h6,10,2)+"┃"+space(8)+"┃ ┃"
- endif
- exit
- endif
- endfor
- @prow()+1,1 say ln4
- if dydh='1'
- @prow()+1,1 say space(6)+"打印日期: "+alltrim(str(year(rdate)))+"年"+alltrim(str(month(rdate)))+"月"+alltrim(str(day(rdate)))+"日 打印时间: "+time()+space(80)+"第 "+alltrim(str(pagenum))+" 页"+" (共"+alltrim(str(ceiling(zys)))+"页)"
- endif
- if dydh='0'
- @prow()+1,1 say space(6)+"打印日期: "+alltrim(str(year(date())))+"年"+alltrim(str(month(date())))+"月"+alltrim(str(day(date())))+"日 打印时间: "+time()+space(20)+"第 "+alltrim(str(pagenum))+" 页"+" (共"+alltrim(str(ceiling(zys)))+"页)"
- endif
- @prow()+1,1 say chr(27)+lineqx
- eject
- pagenum=pagenum+1
- line=1
- enddo
- set printer to
- set device to screen
- set print off
- define window yw from 1,7 to 9,26 shadow color scheme 6
- activate window yw
- move window yw center
- do while .t.
- @0,2 to 6,15
- @1,4 prompt "1-显 示" color scheme 5
- @3,4 prompt "2-打 印" color scheme 5
- @5,4 prompt "0-退 出" color scheme 5
- menu to c
- do case
- case c=1
- !vmore tmp/&prtfile
- m.dwbh=0
- *release window yw
- case c=2
- !lp tmp/&prtfile>;/dev/null
- m.dwbh=0
- *release window yw
- case c=3
- release window yw
- retu
- endcase
- enddo
复制代码 |
|