ShowModal brings wrong form

edited 10:43AM 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 10:43AM
    Hello,

    Did you set TfrxReport.EngineOptions.DestroyForms to False?
  • edited 10:43AM
    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 10:43AM
    DestroyForms=False prevent to clear all report variables after preparing of report

Leave a Comment