Load Report From Code for Designer Use
I would like to be able to have a user select a report from a list, load the DataSet required for the report (in code), have that report loaded and viewable in the Designer (in code), and have the Designer appear with the selected report with loaded dataset show up for the user to modify. So far, I have not been successful trying:
frxReport1.LoadFromFile(RptName);
frxReport1.DesignReport;
The report seems ignored as a blank Report appears and the table loaded into the dataset does not show up. Can someone point me in the right direction?
frxReport1.LoadFromFile(RptName);
frxReport1.DesignReport;
The report seems ignored as a blank Report appears and the table loaded into the dataset does not show up. Can someone point me in the right direction?
Comments
a report remebers its active datasets. and will load them.
here is some typical code
var
rep:tfrxreport;
begin
if opendialog1.Execute then
begin
rep := reportdata.frxreport1;
rep.Clear;
rep.LoadFromFile(opendialog1.filename);
rep.designreport;
end;
end;