It works fine if I use the standard preview form. It only happens when I register a custom Preview Plug In. I set TppPrintPreview(Viewer.Report.PreviewForm).PrintButton.Visible:=False and do a Toolbar.AddButton with the following code: Viewer.Report.DeviceType:=dtPrinter; Viewer.Report.ShowPrintDialog:=True; Viewer.Report.Print;
Is there another property that I need to set? Or, is there a different way to keep the standard PrintButton as the leftmost button when using Toolbar.AddButton?
Rather than calling Report.Print, try calling Viewer.Print. This is what is called when the standard print button is selected and should give you the same behavior.
Comments
It works fine if I use the standard preview form. It only happens when I
register a custom Preview Plug In.
I set
TppPrintPreview(Viewer.Report.PreviewForm).PrintButton.Visible:=False
and do a Toolbar.AddButton with the following code:
Viewer.Report.DeviceType:=dtPrinter;
Viewer.Report.ShowPrintDialog:=True;
Viewer.Report.Print;
Is there another property that I need to set?
Or, is there a different way to keep the standard PrintButton as the
leftmost button when using Toolbar.AddButton?
Thanks,
Perry
Rather than calling Report.Print, try calling Viewer.Print. This is
what is called when the standard print button is selected and should
give you the same behavior.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com