Dialog before report

Hello,


I'm using a report with dialog.

I would like to know if there is a possibility to call the dialog first and not show the report viewer before placing the date filters for example.

Comments

  • Hello!

    To ensure that when using your own PreviewControl, the filter dialog opens first, and the preview window appears (or populates) only after the user clicks OK:

    Call report.Prepare() BEFORE binding or displaying the form with the PreviewControl (the Prepare() method returns a boolean: true if the user clicked OK, and false if they canceled the dialog) .

    Only if report.Prepare() returns true should you assign the preview control and display the prepared report:

    if (report.Prepare())
    {
      report.Preview = previewControl1;
      report.ShowPrepared();
      viewerForm.Show();
    }
    
This discussion has been closed.