Results 1 to 5 of 5

Thread: Problem printing in portrait mode

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Posts
    16

    Problem printing in portrait mode

    Using VB6, I'm trying to print a report in portrait mode and I'm getting a runtime error:

    Report width is larger than the paper width

    The code in use is:

    With RptInvoiceReg
    Set .DataSource = adoVoucherRS
    .Orientation = rptOrientPortrait
    .Show vbModal, Me
    .PrintReport true
    End With

    The report is setup to have 65 columns, can someone tell me what I'm doing wrong?

    Also how do I request 3 copies without user intervention?

    Thanks for your responses.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Problem printing in portrait mode

    What are you using for reporting? Crystal, Access or ???

    Usually you get this error when you have info on your report that is outside of the printable area for your choosen printer. You need to increase the margin(s) where it is too close to the edge of the page. Or with 65 columns you may need to break it up but depending on whatever your using for reporting.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Posts
    16

    Re: Problem printing in portrait mode

    Thanks for responding RobDog888.

    I'm using VB's data report. It prints OK if I define landscape mode.
    How abour the number of copies?

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Problem printing in portrait mode

    Not sure as I never used the DR. It was just too limiting and cumbersome. So I use Crystal Reports and Access Reports. There should be a .Copies property? I know the CommonDialog ShowPrinter has a .Copies property. Maybe if you use it to get the printer and # of copies you can just print in a loop x number of times?[/color]
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Posts
    16

    Re: Problem printing in portrait mode

    Thanks RobDog888

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