我用的是ADODATASET,Master:commandtext:='select * from yh_basic'
detail:commandtext:=Format('select * fro yh_data where yhcode=''%s''',[str]);
procedure TForm1.Button1Click(Sender: TObject);
var
str:string;
begin
str:=inputbox('请输入用户代号','输入代号','');
DetailDataSet.CommandType:=CmdText;
DetailDataSet.CommandText:=Format('select * from yh_data where yhcode=''%s''',[trim(str)]);
// DetailDataSet.
// DetailDataSet.Active:=true;
frxReport1.LoadFromFile('rep1.fr3');
frxReport1.ShowReport();
end;
提示错误! Cannot perform this operation on an open dataset
能留下QQ吗,在线聊,方便一点! 我的QQ:258041655 等待你加我!!!