ShowModal brings wrong form

edited 8:19PM in FastReport 4.0
Hello

I've noticed something very strange. I have a report with 2 dialog pages. I want to show the second one after user click on report object, but FR shows the first one !

I've prepare a test case.

There is one more thing: when I enter into desing mode and click preview it works ok, but report executed from code:

frxReport1.PrepareReport();
frxReport1.ShowPreparedReport;

behaves like I described above.

P.S. (in Delphi XE there is additional AV after dblclick, in D5 it show me DialogPage1 instead of DialogPage2)

b

Comments

  • gpigpi
    edited 8:19PM
    Hello,

    Did you set TfrxReport.EngineOptions.DestroyForms to False?
  • edited 8:19PM
    gpi wrote: »
    Hello,

    Did you set TfrxReport.EngineOptions.DestroyForms to False?

    I didn't. After

    frxReport.EngineOptions.DestroyForms := False;

    it works OK.

    Big thanks !

    I'd like to ask U one more thing - what exactly this property mean ? Destroying forms after preparing a report ? In our system each reports templates are loaded from database - is it better to switch it to False forever ?

    b
  • gpigpi
    edited 8:19PM
    DestroyForms=False prevent to clear all report variables after preparing of report

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.