各位大虾帮帮忙啊!!!!急急急急 ( 积分: 100 )

  • 主题发起人 主题发起人 丁丁小
  • 开始时间 开始时间

丁丁小

Unregistered / Unconfirmed
GUEST, unregistred user!
为什么不能预览(facc0.QuickRep1.Preview;)而直接到(if i=0 then
exit else
//添加新纪录)Delphi 5编的
begin
if I_flag=0 then
exit
else
//dd(if~else
)
facc0.query1.edit;
fieldbyname('yea').asinteger:=yearnum;
fieldbyname('mon').asinteger:=monthnum;
query1.close;
query1.sql.clear;
query1.sql.add('select * from acc0 order by yea,mon');
query1.open;
query1.first;
while not query1.eofdo
begin
{if (query1.fieldbyname('yea').asinteger<>yearnum) or (query1.fieldbyname('mon').asinteger<>monthnum) then
query1.next
else
}
if (query1.fieldbyname('yea').asinteger=yearnum) and (query1.fieldbyname('mon').asinteger=monthnum) then
begin
facc0.QuickRep1.Preview;
query1.Close;
end;
break;
//=================dd(已有记录直接预览)
end;

if i=0 then
exit
else
facc0.query1.append;
//=================dd(添加新的余额记录)
if I_flag=0 then
fieldbyname('aacc0').asfloat:=query1.fieldbyname('bacc0').asfloat;
query1.close;
query1.sql.clear;
query1.sql.add('select sum(acc0) as acc0 from juser');
query1.RequestLive:=True;
facc0.query1.open;
fieldbyname('bacc0').asfloat:=query1.fieldbyname('acc0').asfloat;
post;
close;
clear;
add('select * from acc0 where yea=:yea and mon=:mon');
parambyname('yea').asinteger:=yearnum;
parambyname('mon').asinteger:=monthnum;
open;
facc0.QuickRep1.Preview;
close;
 
为什么不能预览(facc0.QuickRep1.Preview;)而直接到(if i=0 then
exit else
//添加新纪录)Delphi 5编的
begin
if I_flag=0 then
exit
else
//dd(if~else
)
facc0.query1.edit;
fieldbyname('yea').asinteger:=yearnum;
fieldbyname('mon').asinteger:=monthnum;
query1.close;
query1.sql.clear;
query1.sql.add('select * from acc0 order by yea,mon');
query1.open;
query1.first;
while not query1.eofdo
begin
{if (query1.fieldbyname('yea').asinteger<>yearnum) or (query1.fieldbyname('mon').asinteger<>monthnum) then
query1.next
else
}
if (query1.fieldbyname('yea').asinteger=yearnum) and (query1.fieldbyname('mon').asinteger=monthnum) then
begin
facc0.QuickRep1.Preview;
query1.Close;
end;
break;
//=================dd(已有记录直接预览)
end;

if i=0 then
exit
else
facc0.query1.append;
//=================dd(添加新的余额记录)
if I_flag=0 then
fieldbyname('aacc0').asfloat:=query1.fieldbyname('bacc0').asfloat;
query1.close;
query1.sql.clear;
query1.sql.add('select sum(acc0) as acc0 from juser');
query1.RequestLive:=True;
facc0.query1.open;
fieldbyname('bacc0').asfloat:=query1.fieldbyname('acc0').asfloat;
post;
close;
clear;
add('select * from acc0 where yea=:yea and mon=:mon');
parambyname('yea').asinteger:=yearnum;
parambyname('mon').asinteger:=monthnum;
open;
facc0.QuickRep1.Preview;
close;
 

Similar threads

后退
顶部