First Report

Hello,

Newly downloaded FR 2.51 and tried a very simple report. well it works fine when it comes to IDE.

but the problem appears when I want to display the report during run-time. I already encountered two topics about this, and I hope someone will answer me with this problem.

here's the basic code:


procedure TForm1.Button1Click(Sender: TObject);
begin
frreport1.LoadFromFile('d:\cd 2\delphi\report\test.frf');
FRREPORT1.PrepareReport;
frreport1.ShowReport;
end;


the above dont work at all. so any workaround?

thank you.

Comments

  • SamuraySamuray Administrator
    edited 2:31AM
    1. Use this code:
    frReport1.LoadFromFile('filename');
    if frReport1.PrepareReport then
    frreport1.ShowPreparedReport;
    or
    frReport1.LoadFromFile('filename');
    frReport1.ShowReport;

    ShowReport include PrepareReport and ShowPreparedReport.

    2. Filename must exist.
    3. If you give any erroros about missing components - place required component on form.
  • edited 2:31AM
    Thank you very much now it is working.

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.