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

Switching stationary on/off

edited May 2009 in RAP
Hello,

Using RB 10.04, report saved as .rtm file, we have the following
situation:

I want to send a quotation as .PDF to a customer. The .pdf is created by
using the internal email button in the RB preview window. As background
of the report a .jpg of the scanned stationary of the company is used so the
.PDF looks better and the customer has the company details when printing
the .PDF at their home.

This is done using the pagestyle section which works fine.

However, this currently also means that when printing the quotation from the
RB preview window 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 the stationary on/off using RAP?

Kind regards,

Jerri

Comments

  • edited May 2009
    Hi Jerri,

    Just to be clear, this issue has been resolved, correct? My suggestion
    about posting to the RAP newsgroup was for future reference :).

    ---

    if Report.PrinterDevice <> nil then
    Report.PageStyle.Visible := False
    else
    Report.PageStyle.Visible := True;


    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2009
    Hi Nico,

    No it's not. The code below does not give the appropriate result.
    Stationary is shown in .pdf which is good and also printing the .pdf
    gives a good result with stationary printed.

    Unfortunately when sending to the printer locally the stationary is also
    printed which we don not want. So i kinda hope you have another
    suggestion.

    Kind regards,

    Jerri

  • edited May 2009
    Hi Jerri,

    I see now. The event is causing the issue. Try using a different event
    such as the OnPrintDialogClose or OnStartPage.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2009
    Hi Nico,

    I tried both events, result is the same. Stationary is still printed
    when printing directly to printer.

    Had to change the code a bit to make it compile :

    if Report.PrinterDevice <> nil then
    PageStyle.Visible := False
    else
    PageStyle.Visible := True;

    Kind regards,

    Jerri

  • edited May 2009
    I'm going to need more information on the steps you are taking. In my
    tests, the code below works as expected in both events.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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