Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Print from Preview Current Page

edited January 2013 in General
Delphi XE2 RB 14.08 Build 48

Selecting "Current Page" always prints Page 1. This happens in all Page
Display types.

Thanks,
Perry

Comments

  • edited January 2013
    An update to this issue.

    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

  • edited January 2013
    Hi 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.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.