代码如下:
with qr1 do
begin
with Query1 do
begin
close;
sql.Clear ;
repstr:='select * from wmima.db ';
sql.Add(repstr);
prepare;
open;
qrdkhh.DataSet :=query1;
qrdkhh.DataField :='khh';
qrdmima.DataSet :=query1;
qrdmima.DataField :='mima';
qr1.Preview;
end;