foxpro 左右打印

来源:百度知道 编辑:UC知道 时间:2024/06/07 13:05:56
用foxpro怎么能这样打印地址?

100081 100080
北京市白石桥路39号 北京市海淀区北京大学中关园
国家图书馆 北京大学中关园
XXX 收 XXX 收

这么左右分栏打时怎么做出来的?
谢谢各位高手指点,急……

*设原表为 表1.dbf,建立新表为 temp.dbf。你只要对temp.dbf作报表输出。我将表1生temp的代码提供你参考:

close all data
set talk off
set exac on
if file("temp.dbf")
dele file temp.dbf
endif
crea table temp(邮编 c(8),收信地址 c(50),收信姓名 c(20),寄信地址 c(50),寄信邮编 c(8))
if file("表1.dbf")
appe from 表1.dbf
dele file 表1.dbf
endif
copy to 表1.dbf
use 表1
dele file temp.dbf

crea table temp(邮编1 c(8),收信地址1 c(50),收信姓名1 c(20),寄信地址1 c(50),寄信邮编1 c(8),邮编2 c(8),收信地址2 c(50),收信姓名2 c(20),寄信地址2 c(50),寄信邮编2 c(8))

sele 1
zs=iif(int(recc()/2)=recc()/2,recc()/2,int(recc()/2)+1)
if recc()/2<>int(recc()/2)
appe blan
endif
k=1
for i=1 to zs
sele 1
goto k
a1=邮编
a2=收信地址
a3=收信姓名
a4=寄信地址
a5=寄信邮编
goto k+1
a6=邮编
a7=收信地址
a8=收信姓名
a9=寄信地址
a10=寄信邮编
k=k+2
sele 2
appe blan
repl