Switching printing of stationary on/off
Hello,
I have the following situation:
I want to send a quotation as .PDF to a customer. As background
a .jpg of the scanned stationary of the company is put in so the .PDF
looks better and the customer has the company details when printing
the .PDF. This is done using the pagestyle section. This works fine.
However, currently this also means that when printing the quotation
for internal use the stationary gets printed as well. This is annoying
because internally the paper in the printer already has all details on it.
How can I switch this on/off?
Kind regards,
Jerri
I have the following situation:
I want to send a quotation as .PDF to a customer. As background
a .jpg of the scanned stationary of the company is put in so the .PDF
looks better and the customer has the company details when printing
the .PDF. This is done using the pagestyle section. This works fine.
However, currently this also means that when printing the quotation
for internal use the stationary gets printed as well. This is annoying
because internally the paper in the printer already has all details on it.
How can I switch this on/off?
Kind regards,
Jerri
This discussion has been closed.
Comments
When printing the stationary internally, simply set the PageStyle band's
Visible property to False.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
This can be done using the Report.BeforePrint event
if myReport.PrinterDevice <> nil then
myReport.PageStyle.Visible := False
else
myReport.PageStyle.Visible := True;
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
I tried using the code below but no matter what I try, the stationary gets
printed anyway?
Remember, I want the stationary visible when I created an email containing
the quotation
as .PDF through the Preview screen and not visible when I print it to a
local printer.
Kind Regards,
Jerri
In my testing with the code below in the Report.BeforePrint event, the
pagestyle band did not print when printing to the printer from the preview
window. If you step into that code, is the printer device equal to nil when
printing to the printer?
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I had to adjust your code a bit otherwise it would not allow compilation in
the Report.BeforePrint event:
if Report.PrinterDevice <> nil then
PageStyle.Visible := False
else
PageStyle.Visible := True;
This code does give the desired effect. Printing from the preview still
gives me the stationary. Regarding your remark about stepping into the code.
Frankly, I do not know how to do this. Perhaps it has to do with the fact
that I am using an .rtm file which is called when I need the report instead
of the Report being on a Delphi Form through a Report component?
Kind regards,
Jerri
Sorry, I was unaware that you were using RAP. For future reference, please
let us know if you are writing code in Delphi or RAP code, or post in the
RAP newsgroup. This prevents much confusion.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com