Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 10th, 2005, 07:04 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default Report Orientation Problem

I have several application written in Access 2003 that create reports dynamically to print out. They worked fine last week, but now when the report is previewed the page is shown as landscape, even though it still prints with a Portrait orientation. I am pulling what is left of my hair out trying to figure it out. Has anyone seen anything similar, or know what could cause this?

An extract of the creation code is...

Private Sub PrintLetter()
    Dim printReport As Report
    Dim ctrlLogo As Control
    ...

    Set printReport = CreateReport()
    printReport.Printer.TopMargin = 720
    printReport.Printer.BottomMargin = 1440
    printReport.Printer.LeftMargin = 1440
    printReport.Printer.RightMargin = 1440
    printReport.Printer.Orientation = acAPRORPortrait

    Set ctrlLogo = CreateReportControl(printReport.Name,
    acImage, , , , 3260, 0, 2840, 940)
    ...

Thanks in advance

Mike

Mike
EchoVue.com
__________________
Mike
EchoVue.com
 
Old January 11th, 2005, 01:35 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Sorry to bother everyone. The problem was that despite setting the Orientation to Portrait, my default printer somehow got set to use landscape as the default orientation and this was overinding any VBA code that I had in place.

I am now bald and feeling kind of sheepish!

Mike
EchoVue.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report Changing Orientation garrysmith68 Beginning VB 6 0 June 6th, 2006 06:42 AM
Crystal Report Orientation = Landscape in asp agoz Classic ASP Professional 0 February 17th, 2006 04:15 AM
Object Orientation sreechand_b J2EE 0 June 3rd, 2005 03:56 AM
Table Orientation blaflin BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 2 November 11th, 2004 01:36 PM
Data Report: Orientation blackdevil1979 Beginning VB 6 1 September 9th, 2004 11:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.