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

different top margin on odd and even pages

edited April 2011 in General
Hi,

I would like to have a different top margin on odd and even pages.
I've tried this code:

procedure TReport.ppReportStartPage(Sender: TObject);
begin
if ppReport.SecondPass then
begin
if ppReport.Page mod 2 > 0 then
ppReport.PrinterSetup.MarginTop := 1.25
else
ppReport.PrinterSetup.MarginTop := 0.25;
end;
end;

but the code seems to do nothing.
The report uses the margin that was set in the properties, and doesn't take
into account the new margins that are set dynamically.
As you can see in the code, the report is set to TwoPass.
While debugging, I see the margins are changed correctly, but in the report
only the original margin is used for all pages...
Any ideas?

Comments

  • edited April 2011
    I forgot to say I'm using D6 and RB9.03

  • edited April 2011

    Try setting Report.Engine.Page.PrinterSetup properties.


    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited April 2011
    Setting the Report.Engine.Page.PrinterSetup property worked!
    Thx!

This discussion has been closed.