different top margin on odd and even pages
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?
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?
This discussion has been closed.
Comments
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
Thx!