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?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 1:06AM
    make sure you have path and file name.
    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;

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.