No AutoSearch Dialog at Print
I have a homegrown Report Viewer form that displays a list of report
templates and displays them in a ppViewer control.
When I execute a Print action, the AutoSearch dialog is displayed.
How do I prevent the AutoSearch dialog from displaying when a print action
is taken?
Thanks, Patrick
templates and displays them in a ppViewer control.
When I execute a Print action, the AutoSearch dialog is displayed.
How do I prevent the AutoSearch dialog from displaying when a print action
is taken?
Thanks, Patrick
This discussion has been closed.
Comments
Set the Report.ShowAutoSearchDialog property to False.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks. The ppReport.ShowAutoSearchDialog property is set to FALSE. We use
the following event handler when the Print button is clicked ...
procedure TfrmRulesAndView.btnPrintClick(Sender: TObject);
begin
{ print }
ppReport.AllowPrintToFile := TRUE;
ppReport.ShowPrintDialog := TRUE;
ppReport.DeviceType := dtPrinter;
ppReport.PDFSettings.OpenPDFFile := TRUE;
ppReport.CurrentPage := ppReport.PageNo;
case cxpcTemplates.ActivePageIndex of
FSTAB: if (lboxFS.Items.Count > 0) AND (lboxFS.ItemIndex <> -1) then
ppViewer.Report.Print;
DBTAB: if (lboxDB.Items.Count > 0) AND (lboxDB.ItemIndex <> -1) then
ppViewer.Report.Print;
end;
end;
Patrick
If you are loading templates, all properties set before the template is
loaded will be replaced with the saved template properties. Try using the
OnLoadEnd template event to assign any properties you would like to affect
all loaded reports.
http://www.digital-metaphors.com/rbWiki/Design/Templates/Using_Template_Events
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com