Home Devices

Letterhead paper problem

edited August 2011 in Devices
Dear all,

I have put letterhead paper in the Pagestyle of reports so that
when a .pdf is produced the letterhead is included. This works

However, when previewing the report locally and printing it the
report should not print the background on paper since there is
allready letterhead paper available in the printer bin.

The following code is used in two events (ReportBeforePrint,

if (Report.PrinterDevice <> nil) and (Report.FileDevice = nil) then
PageStyle.Visible := False
PageStyle.Visible := True;

Report.EmailSettings.Subject:= ('Factuur'+' '+ORDERS['INVOICEID']);


I am using RB 12.05, Delphi2010, Firebird 2.5.

Somewhere I am missing the point but where?

Kind regards,



  • edited August 2011
    Hi Jerri,

    My guess is that in some cases, even though you are printing to the
    printer, the file device is not nil. Try tracing this code and see if
    that is the case. You may want to simply remove that part of the
    condition from your code.

    Best Regards,

    Nico Cizik
    Digital Metaphors
This discussion has been closed.