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

Printposition Property ?

edited March 2002 in General
At present , Printposition Property represent the vertical position from top
edge , and does not take care margin setting.
So that every time user amend top margin . i also need to amend those
component which have specific printposition value.

Is there chance that printposition take care of margin setting or how can i
do it?


Thanks a lot.

Comments

  • edited March 2002
    You can dynamically adjust the height of the band that you want to position
    based on the margin settings of the printer in the BeforePrint event of that
    band. For example, the following code would always place the Footer band 8
    units from the bottom of the margin regardless of how wide the margins are.

    --------------------------------------------------------------------

    procedure TForm1.ppFooterBand1BeforePrint(Sender: TObject);
    begin
    ppFooterBand1.PrintPosition := 8 + ppReport1.PrinterSetup.MarginTop;
    end;

    --------------------------------------------------------------------

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

This discussion has been closed.