[ActiveReports] Landscape and Portrait
I have a report that I want to print in portrait for some pages and landscape for others, any suggestions?
The first two pages are a covering letter and need to be in portrait, the next pages need to be in landscape orientation. I know I can use AddRange to add the landscape report's pages to the covering letter, but this means all the covering letters are printed then the other pages. Obviously, I want to print the letter then the body of the report, then the next letter etc.
Re: <Resolved>[ActiveReports] Landscape and Portrait
Finally worked it out!
I put the landscape pages in a sub report at the end of the covering letter, preceded by a page break, and added the following code to the sub reports PageStart and PageEnd events:
Code:
private void SubReport_PageStart(object sender, System.EventArgs eArgs)
{
this.ParentReport.Document.Printer.Landscape = true;
}
private void SubReport_PageEnd(object sender, System.EventArgs eArgs)
{
this.ParentReport.Document.Printer.Landscape = false;
}