2,726
社区成员
发帖
与我相关
我的任务
分享
[code=text]*** 打印表尾部分
sele dy_file
set filt to allt(tab_name) == m_filename .and. tab_title = '3'
go top
calc max(tab_xh) to file_max
sele dy_info
set filt to allt(tab_name) == m_filename .and. tab_title = '3'
calc max(tab_xh) to info_max
m_max=max(file_max,info_max)
rele info_max,file_max
go top
FOR m_ii = 0 to m_max
loca for tab_xh = m_ii
if !eof()
m_font=" "
m_info=''
for m_kk = 1 to 9
m_ls = 't_'+allt(str(m_kk))
m_font1 = &m_ls
if at('FONT',upper(m_font1)) = 0
m_info = m_info + m_font1
else
*** 设字体
m_info = m_info + spac(len(m_font1))
m_font = 'SET PRINT '+ m_font1
&M_FONT
endif
endfor
m_info = trim(m_info)
@ m_pgjs + m_ii ,0 say m_info
sele dy_file
scan for tab_xh = m_ii
m_row = tab_row
m_col = tab_col
m_vare = allt(tab_vare)
sele (old_sele)
@ m_row + m_pgjs ,m_col say &m_vare
sele dy_file
endscan
endif
sele dy_info
ENDFOR
ejec
sele (old_sele)
__pg = __pg + 1
ENDDO
set print font '宋体',9 STYLE 'N'
set print off
set devi to scre &&将@...say 直接输出到屏幕
[/code]*** 打印中间部分
sele dy_info &&取线框
set filt to allt(tab_name) == m_filename .and. tab_title = '2'
go top
m_info1=''
m_info2=''
m_bz=.t.
scan
for m_kk = 1 to 9
m_ls = 't_'+allt(str(m_kk))
m_font1 = &m_ls
if at('FONT',upper(m_font1)) <> 0
m_font = 'SET PRINT '+ m_font1
&M_FONT
if m_bz
m_info1 = m_info1 + spac(len(m_font1))
else
m_info2 = m_info2 + spac(len(m_font1))
endif
else
if m_bz
m_info1 = m_info1 + m_font1
else
m_info2 = m_info2 + m_font1
endif
endif
endfor
if m_bz
m_info1 = trim(m_info1)
else
m_info2 = trim(m_info2)
endif
m_bz = .f.
endscan
** 取页汇总变量名
sele dy_file
set filt to allt(tab_name) == m_filename .and. tab_title = '2' ;
.and. !empty(tab_total)
go top
scan && 初始化页汇总变量
m_total = allt(tab_total)
&m_total = 0
endscan
set filt to allt(tab_name) == m_filename .and. tab_title = '2'
sele (old_sele)
m_pgjs = prow()
m_len = 0
m_qdxh=qdxh
do while !eof() .and. m_len < m_repat .and. qdxh=m_qdxh
sele dy_file
go top
m_star=tab_row
@ m_pgjs + m_star , 0 say m_info1
scan
m_row = tab_row
m_col = tab_col
m_vare = allt(tab_vare)+;
iif(tab_type='N' and !empty(tab_pict)," pict '"+allt(tab_pict)+"'","")
m_vare1= allt(tab_vare)
m_total= allt(tab_total)
sele (old_sele)
@ m_row + m_pgjs , m_col say &m_vare
if !empty(m_total) && 计算页汇总
&m_total = &m_total + &m_vare1
endif
sele dy_file
endscan
sele (old_sele)
skip
m_pgjs = m_pgjs + 1
m_len = m_len + 1
** if !eof() .and. m_len < m_repat
if m_len < m_repat &&& 1999.11.19
@ m_row + m_pgjs , 0 say m_info2
if m_jamp
m_pgjs = m_pgjs + 1
m_len = m_len + 1
endif
endif
enddo
if .t. &&& 1999.11.19
do while m_len < m_repat
@ m_row + m_pgjs , 0 say m_info1
m_pgjs = m_pgjs + 1
m_len = m_len + 1
if m_len <> m_repat
@ m_row + m_pgjs , 0 say m_info2
m_pgjs = m_pgjs + 1
m_len = m_len + 1
endif
enddo
endif
*** 打印表头部分
m_pgjs = prow()
sele dy_file
set filt to allt(tab_name) == m_filename .and. tab_title = '1'
go top
calc max(tab_xh) to file_max
sele dy_info
set filt to allt(tab_name) == m_filename .and. tab_title = '1'
calc max(tab_xh) to info_max
m_max=max(file_max,info_max)
rele info_max,file_max
go top
FOR m_ii = 0 to m_max
loca for tab_xh = m_ii
if !eof()
m_font=" "
m_info=''
for m_kk = 1 to 9
m_ls = 't_'+allt(str(m_kk))
m_font1 = &m_ls
if at('FONT',upper(m_font1)) = 0
m_info = m_info + m_font1
else
*** 设字体
m_info = m_info + spac(len(m_font1))
m_font = 'SET PRINT '+ m_font1
&M_FONT
endif
endfor
*wait wind m_font
* m_info = "say '"+trim(m_info)+"' "+m_font
* @ m_pgjs + m_ii ,0 &m_info
@ m_pgjs + m_ii ,0 say m_info
sele dy_file
scan for tab_row = m_ii
m_row = tab_row
m_col = tab_col
m_vare = allt(tab_vare)
sele (old_sele)
@ m_row + m_pgjs ,m_col say &m_vare
sele dy_file
endscan
endif
sele dy_info
ENDFOR