报表显示不全的问题,有没有人帮忙

zhaoshaom 2002-12-24 12:34:40
select * ;
from moneyf ;
into cursor c_tmp ;
where iif(m_a_mcode, .t., between(f_mcode, m_f_mcode, m_t_mcode)) ;
and iif(m_a_ctcode, .t., between(f_spec,m_f_ctcode, m_t_ctcode)) ;
and iif(m_a_bcode, .t., between(f_bcode, m_f_bcode, m_t_bcode)) ;
and iif(m_a_mdate, .t., between(f_mdate, m_f_mdate, m_t_mdate)) ;
and iif(m_a_icode, .t., between(f_icode, m_f_icode, m_t_icode)) ;
and iif(m_type=1, between(val(f_icode),101,999), .t.) ;
and iif(m_type=2, between(val(f_icode),101,499), .t.) ;
and iif(m_type=3, between(val(f_icode),501,599), .t.) ;
and iif(m_type=5, between(val(f_icode),701,799), .t.) ;
and iif(m_type=6, between(val(f_icode),801,849), .t.) ;
and iif(m_type=7, between(val(f_icode),850,899), .t.) ;
and iif(m_type=4, between(val(f_icode),901,999) or between(val(f_icode),601,699) , .t.)
&& sz xhf 2002.12.23 }}

m_typen = v_typen()

select f_ctcode,f_spec, f_iname,f_mcode,f_bcode,f_miquan,f_mpricea ;
from c_tmp;
into cursor c_tmp1;
group by f_ctcode,f_icode;
order by f_ctcode

select c_tmp
sum f_miquan,f_miquan *f_mpricea to m_mquan,m_price for f_ctcode=c_tmp1.f_ctcode

&& xhf 2002.12.23 {{
create cursor c_xtmp (;
f_ctcode c(15) ,;
f_mquan n(15,4) ,;
f_price n(15,4) )

index on f_ctcode tag f_ctcode

select f_ctcode, sum(f_miquan) as f_mquan,;
sum(f_mpricea*f_miquan) as f_price;
from c_tmp;
into cursor c_xtmp1;
group by f_ctcode

select c_xtmp
append from dbf('c_xtmp1')
set order to f_ctcode
&& xhf 2002.12.23 }}

select c_tmp1
&& set relation to f_ctcode into customermf,f_bcode into buyerf && xhf 2002.12.23
set relation to f_ctcode into customermf,f_bcode into buyerf, f_ctcode into c_xtmp && xhf 2002.12.23

select c_tmp1
scan
&& xhf 2002.12.20 {{
*!* select c_tmp
*!* select sum(f_miquan) as m_mquan,sum(f_mpricea * f_miquan) as m_price;
*!* from c_tmp;
*!* into cursor c_tmp2;
*!* where c_tmp.f_ctcode=c_tmp1.f_ctcode
&& xhf 2002.12.20 }}

select c_p_tmp
append blank
replace f_ctcode with c_tmp1.f_ctcode
replace f_bcode with c_tmp1.f_bcode
replace f_mpricea with c_tmp1.f_mpricea
replace f_bname with buyerf.f_name
replace f_miquan with c_tmp1.f_miquan
replace f_iname with c_tmp1.f_iname
replace f_mcode with c_tmp1.f_mcode

&& xhf {{
*!* replace f_shname with iif(empty(f_spec),customermf.f_shname,c_tmp1.f_spec)
replace f_shname with iif(empty(c_tmp1.f_spec),customermf.f_shname,c_tmp1.f_spec) && xhf
replace f_quan with c_xtmp.f_mquan
replace f_add with c_xtmp.f_price
*!* replace f_quan with c_tmp2.m_mquan
*!* replace f_add with c_tmp2.m_price
&& xhf }}
endscan
...全文
95 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
流星尔 2002-12-24
  • 打赏
  • 举报
回复
具体说说什么情况

2,749

社区成员

发帖
与我相关
我的任务
社区描述
VFP,是Microsoft公司推出的数据库开发软件,用它来开发数据库,既简单又方便。
社区管理员
  • VFP社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧