Hide Print Button in Preview Form
Hi,
I want to show the generated report on screen but don't want the user to
click print button or print the report in any way. Is there any way to
prevent this?
As the user could easily use printscreen and paintbrush to send to printer
I will also use some code to render labels with "INVALID" when I don't want
it to be printed.
Thanks
Ricardo
I want to show the generated report on screen but don't want the user to
click print button or print the report in any way. Is there any way to
prevent this?
As the user could easily use printscreen and paintbrush to send to printer
I will also use some code to render labels with "INVALID" when I don't want
it to be printed.
Thanks
Ricardo
This discussion has been closed.
Comments
- One solution is to create a custom preview plug-in class. Here is an
example...
www.digital-metaphors.com/tips/PreviewerHidePrintButton.zip
- Another solution is use the Report.OnPreviewFormCreate event to gain
access to the controls of the default preview form.
uses
ppPrvDlg;
procedure TForm1.ppReport1PreviewFormCreate(Sender: TObject);
begin
TppPrintPreview(ppReport1.PreviewForm).PrintButton.Visible := False;
end;
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com