Cancel from Custom Search dialog.
Hi,
RB 7.02 Ent., Delphi 5/7, daDOA.
We have set up a custom search dialog overriding the built in one. In
general it works great. However we have one problem:
When the user clicks cancel, we haven't found any way of actually stopping
the report from being printed. Since this dialog is hooked on a RB handler,
I think the only option would be to set some bool value or call a method of
RB to cancel. Anyone who knows how to do this?
In a slow system this is frustrating for the user. Our only option would be
to get rid of the Cancel-button, but I don't want to do that.
Best Regards,
Paul
RB 7.02 Ent., Delphi 5/7, daDOA.
We have set up a custom search dialog overriding the built in one. In
general it works great. However we have one problem:
When the user clicks cancel, we haven't found any way of actually stopping
the report from being printed. Since this dialog is hooked on a RB handler,
I think the only option would be to set some bool value or call a method of
RB to cancel. Anyone who knows how to do this?
In a slow system this is frustrating for the user. Our only option would be
to get rid of the Cancel-button, but I don't want to do that.
Best Regards,
Paul
This discussion has been closed.
Comments
In the built-in ReportBuilder autosearch dialog, there is a cancel button
that works the way you want. In the ppASDlg.pas file, this is simply a
TButton with its ModalResult equal to mrCancel. Printing is then suppressed
in the TppReport.Print method (located in the ppReport.pas file). Trace
into this method to see exactly how this is done.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Ok, I can't have hooked it up correctly then, because I do have modalresult
set to mrCancel.
I will trace and see what I can find.
Paul