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

Print outside the margin

edited September 2001 in General
Hello,

I want to print two little lines on the left side of
the page. These lines are used to mark the
position where to fold the paper (it will be
send as a letter).

My report has a margin of 2 cm on the left side.
How can I place a little line on a fixed vertical position
on the uttermost left side of the paper?

Thank you very much,
Klaus

Comments

  • edited September 2001
    If you can't change the margins, then you can create a draw line command
    object. Use the OnEndPage event of the report to print the line anywhere in
    the printable width of the page. Here is a demo which draw two vertical
    lines from the last detail down to the bottom of the page. You can change
    the example to print the lines from the top to the bottom of the page.

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

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited September 2001
    Hello Jim,

    wonderful, it works.

    Actually, I only needed something like

    procedure TForm1.ppReport1EndPage(Sender: TObject);
    var
    lDrawMyLine: TppDrawLine;
    begin
    lDrawMyLine := TppDrawLine.Create(nil);
    lDrawMyLine.Page := ppReport1.Engine.Page;
    lDrawMyLine.LinePosition := lpTop;
    lDrawMyLine.Left := 0;
    lDrawMyLine.Top := 20000;
    lDrawMyLine.Width := 5000;
    end;
    end;

    Is there any chance to do this with RAP?
    I tried to put this code in the OnEndPage event
    inside the report and changed
    lDrawMyLine.Page := ppReport1.Engine.Page;
    to
    lDrawMyLine.Page := Report.Engine.Page;

    But it seems RAP doesn't know the 'Engine'-property.

    Thank you very much,
    Klaus
  • edited September 2001
    Hi Klaus,


    I would use a PassThrough function in your case.

    regards,
    Chris Ueberall;
This discussion has been closed.