C
cqwty
Unregistered / Unconfirmed
GUEST, unregistred user!
我在窗体上放了一个TFrxReport,frxDBDataset1,ADOQuery,ADOConnection,设定了adoquery和adoconnection的连接,把frxdbdataset的dataset设置成adoquery,把frxreport的dataset设置成了frxDBDataset1。设计了报表,但是通过adoquery查询出来的结果在报表里面却看不到,怎么回事啊?还需要设置什么吗?
代码:
procedure TForm1.Button2Click(Sender: TObject);
begin
frxreport1.LoadFromFile('test.fr3');
with Adoquery1do
begin
Close;
sql.Clear;
sql.Add('select * from stuinfotable');
open;
end;
frxreport1.ShowReport(true);
end;
代码:
procedure TForm1.Button2Click(Sender: TObject);
begin
frxreport1.LoadFromFile('test.fr3');
with Adoquery1do
begin
Close;
sql.Clear;
sql.Add('select * from stuinfotable');
open;
end;
frxreport1.ShowReport(true);
end;