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

Getting Print Preview to display different information to actual printout.

edited June 2012 in General
Hi,

I was wondering - is it possible to set a label in Reportbuilder that
will print certain text for previews, but different text if the job is
sent to the printer?

(ie, set a caption to show 'PREVIEW COPY' if printed to the screen and
saved to a PDF file, and the same caption to show 'PRINTED COPY' if it's
sent to the printer)?

Cheers

Adam.

Comments

  • edited June 2012
    Hi Adam,

    If you are allowing your users to view the print dialog before printing,
    you can use the OnPrintDialogClose event to check the
    Report.PrintDialog.DeviceType to determine whether they are printing to
    file or the printer and change the label accordingly.

    You could do another check when they initially call Report.Print to
    determine if they are previewing or printing. Report.DeviceType.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2012
    Hi Niko,

    Thanks for your reply. Unfortunately I've hit a bit of a snag, in that
    the users will print to the screen often, but then continue to print
    from there to the printer.

    However, I have noticed that the OnPrint event fires both when I print
    the preview, and also when I continue to print it from the preview to
    the actual printer, so I have been able to use your suggestion about
    checking the Report.DeviceType at this location to solve the issue.

    Thanks for your help!

    Best Regards

    Adam.

This discussion has been closed.