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

Printing Watermark / 'DUPLICATE' text

edited August 2004 in General
We need the ability to print the text COPY or DUPLICATE across a page when a
document is printed a second time.

We thought the most logical route would be to set up a PageStyle band and
add the appropriate text and simply turn on or off the Visible property as
required.

However, there are a number of RB objects (shapes etc.) that cannot be set
to transparent, so it does not work as well as expected.

Ideally, we can the ability to print OVER THE TOP of whatever is below e.g.
print DUPLICATE in grey or red over whatever is underneath.

Any suggestion as to how we can achieve this, preferably without have to
redesign the existing reports to avoid using objects that do not support
'Transparent' or similar.

Any suggestions gratefully received!

Comments

  • edited August 2004
    Hi Peter,

    Check out the following example on placing a unique caption in the PageStyle
    band of the report (watermark) for each copy of the report.

    http://www.digital-metaphors.com/tips/UniqueCaptionForEachCopy.zip

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2004
    Thanks for this - although we have already tried this, and did not get good
    results.

    I think the PageStyle band was designed for printing a form BEHIND the data.

    As it in effect prints as an UNDERLAY and not an OVERLAY, it does not do
    what we want e.g. to print DRAFT or COPY diagonally across the page (as Word
    and other packages do).

    The reason is that many objects (e.g. shapes) do not support transparency
    (and it takes ages going through a whole report setting those that do to
    True!).

    Is there any way of getting RB to print the page style as an overlay? I have
    tried enabling Bring to Front, to no avail.

    Regards,

    Pete Colson

  • edited September 2004
    Hi Peter,

    By definition the PageStyle will print behind all the main report components
    in that page space. This could be accomplished by creating a draw command
    in the OnEndPage and positioning it on the page as you need (in microns). I
    just ran the code below which does just that.

    procedure TForm1.ppReport1EndPage(Sender: TObject);
    var
    lDrawText: TppDrawText;
    begin

    lDrawText := TppDrawText.Create(nil);

    lDrawText.Page := ppReport1.Engine.Page;
    lDrawText.Text := 'DUPLICATE';
    lDrawText.Left := Trunc(ppReport1.Engine.Page.PageDef.mmWidth / 2);
    lDrawText.Top := Trunc(ppReport1.Engine.Page.PageDef.mmHeight / 2);
    lDrawText.Width := 50000;
    lDrawText.Height := 20000;
    lDrawText.Font.Size := 24;

    end;

    --
    Best Regards,

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