OnPrintPage
Hello,
i run into the following problem:
After assigning
procedure TForm.frReportPrintPage(Page: TfrxReportPage; CopyNo: Integer);
begin
page.LeftMargin := 100;
page.RightMargin := 100;
page.TopMargin := 100;
page.BottomMargin := 100;
end;
and printing report with
frReport.PrepareReport;
frReport.Print;
calls the OnPrintPage Event, and everything is fine but
preview report with
frReport.PrepareReport;
frReport.ShowPreparedReport;
or
frReport.ShowReport;
don't calls the Event OnPrintPage!!!!!
What i am doing wrong?
Delphi 2007
Fastreport 4.7.31
Thanks,
Patrick
i run into the following problem:
After assigning
procedure TForm.frReportPrintPage(Page: TfrxReportPage; CopyNo: Integer);
begin
page.LeftMargin := 100;
page.RightMargin := 100;
page.TopMargin := 100;
page.BottomMargin := 100;
end;
and printing report with
frReport.PrepareReport;
frReport.Print;
calls the OnPrintPage Event, and everything is fine but
preview report with
frReport.PrepareReport;
frReport.ShowPreparedReport;
or
frReport.ShowReport;
don't calls the Event OnPrintPage!!!!!
What i am doing wrong?
Delphi 2007
Fastreport 4.7.31
Thanks,
Patrick
Comments
any idea for this problem?
Thanks,
Patrick
Try to use TfrxReport.OnBeforePrint event
but in TfrxReport.OnBeforePrint i can't set margins for page!
OnPrintPage is the only way i know to set margins...
Maybe you know another?
Thanks,
Patrick
...thanks for your answer, but "Page" is always nil in this event...
Patrick
someone else can help me to set page margins in preview?
Thanks,
Patrick