Drill Down and Dialogs just don't work

edited 7:53PM in FastReport 4.0
Good morning,

I have asked this question prior but don't understand the response.

Once again. I have a dialog that sets report parameters. Once the dialog is close (ModalResult = mrOK) and the report displayed, clicking the drill downs redisplays the dialog.

I understand the drill-downs run the reports again but do not want the dialog. In the dialog I have set the query etc and it does not need to execute again.

I have tried Visible:=false and it seems to work in the editor but the moment I run the report from the preview only it shows the dialog again.

I'm sure that there is a fix to this because it would be completely unusable without it.

Any ideas please (code example would be nice).

Thank you

Regards
Tony Benci

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 7:53PM
    after loading report and before calling showreport or prepare report.

    frxReport1.EngineOptions.DestroyForms:=False;
  • edited September 2010
    gordk, can you add a source code?
  • gordkgordk St.Catherines On. Canada.
    edited 7:53PM
    frxreport1.loadfromfile('path&filename.fr3');
    frxreport1.engineoptions.Destroyforms:= false;
    frxreport1.showreport;
  • edited 7:53PM
    thx
  • edited October 2010
    Also you can use Application.Tag.

    In procedure Button1OnClick(Sender: TfrxComponent)

    set:
    Report.EngineOptions.DestroyForms := False;  
    Application.Tag := 1;
    

    next in RptOnRunDialogs( procedure RptOnRunDialogs(var Result: Boolean);) event or PageOnBeforePrint or smth
    set code like:
    if Application.Tag = 1 
       then             
           DialogPage1.Visible := false;
    

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.