|
-
Sep 15th, 2008, 07:40 AM
#1
Thread Starter
Hyperactive Member
[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.
-
Sep 19th, 2008, 04:17 AM
#2
Thread Starter
Hyperactive Member
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;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|