My code error???Thanks!!
I have designed my report in the FastReport designer,then I wirte the code below,but when run,it's show error"cannot use the same dataset for report.dataset and band.dataset"
procedure TForm1.Button1Click(Sender: TObject);
begin
ADOQuery1.SQL.Add('SELECT * FROM TJ where xm like ''%王%''');
frxDBDataset2.DataSet:=ADOQuery1;
frxReport2.DataSet:=frxDBDataset2;
frxReport2.showreport;
end;
end.
how can i do????
thanks!
procedure TForm1.Button1Click(Sender: TObject);
begin
ADOQuery1.SQL.Add('SELECT * FROM TJ where xm like ''%王%''');
frxDBDataset2.DataSet:=ADOQuery1;
frxReport2.DataSet:=frxDBDataset2;
frxReport2.showreport;
end;
end.
how can i do????
thanks!
Comments
frxReport2.DataSet:=frxDBDataset2;
line