搞了好长时间,还是没有解决的问题!(10分)

  • 主题发起人 主题发起人 sxd2002
  • 开始时间 开始时间
S

sxd2002

Unregistered / Unconfirmed
GUEST, unregistred user!
with Query1do
begin
query1.Close;
query1.SQL.Clear;
Query1.SQL.Add(' Select hm,sum(je),count(*) from temp.db group by hm ');
query1.Open;
QuickReport1.DataSet:=query1;
QuickReport1.QRDBText1.DataSet:=query1;
QuickReport1.QRDBText1.DataField:='hm';
QuickReport1.QRDBText2.DataSet:=query1;
QuickReport1.QRDBText2.DataField:='sum(je)';
QuickReport1.QRDBText3.DataSet:=query1;
QuickReport1.QRDBText3.DataField:='count(*)';
QuickReport1.QRDBText4.DataSet:=query1;
QuickReport1.Preview;
end;
QUERY是没有问题,就是QuickReport1.QRDBText2.DataField:=sum(je);在报表里没有数据
 
Query1.SQL.Add(' Select hm,sum(je) as je,count(*) as cn from temp.db group by hm ');
...
QuickReport1.QRDBText2.DataField:='je';
QuickReport1.QRDBText3.DataField:='cn';
...
 
接受答案了.
 
后退
顶部