Results 1 to 2 of 2

Thread: [ActiveReports] Landscape and Portrait

  1. #1

    Thread Starter
    Hyperactive Member GlenW's Avatar
    Join Date
    Nov 2001
    Location
    Gateshead, England
    Posts
    479

    [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.

  2. #2

    Thread Starter
    Hyperactive Member GlenW's Avatar
    Join Date
    Nov 2001
    Location
    Gateshead, England
    Posts
    479

    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
  •  



Click Here to Expand Forum to Full Width