procedure setRepDataSource;
var
DB : TfrxADODatabase;
Query: TfrxADOQuery;
begin
with Main.frxReport1 do begin
DB := TfrxADODatabase(FindObject('ADODatabase1'));
DB.Connected := False;
DB.DatabaseName := DM.ADOC1.ConnectionString;
DB.Connected := True;
Query := TfrxADOQuery(FindObject('ADOQuery1'));
Query.Close;
Query.SQL.Text:=DM.ADODataSet1.CommandText;
Query.Open;
end;
end;
沒有留言:
張貼留言