I'm using Embarcadero version of FastReport and I need to change the orientation of some subreport pages at runtime (mostly because of pictures). Based on Programmer's manual it should be easy, but I can't figure out how or when it is possible. I tried to change all pages in these two events, but without success. I'm not sure if it works at all in this version or I'm missing something.
TfrxReport.OnBeforePaint
procedure TForm1.frxReportBeforePrint(Sender: TfrxReportComponent);
begin
if Assigned(Sender.Page) then
TfrxReportPage(Sender.Page).Orientation := TPrinterOrientation.poLandscape;
end;
TfrxReport.OnPrintPage
procedure TForm1.frxReportPrintPage(Page: TfrxReportPage; CopyNo: Integer);
begin
TfrxReportPage(Page).Orientation := TPrinterOrientation.poLandscape;
end;