Results 1 to 4 of 4

Thread: [2008] ReportViewer remote landscape printing

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Location
    Manchester, England
    Posts
    255

    [2008] ReportViewer remote landscape printing

    Hello all,
    I have a bit of a strange one here. Not entirely sure its a VB.NET problem, or a hardware problem, or a combination of both, but as the app is written in VB.NET, I thought I'd start here!
    I've written the app involving the ReportViewer, and I'm using .rdlc reports. I have a range of A4 portrait and landscape reports which print fine when I run the app locally, and print locally, but they don't seem to want to print properly when the app is executed remotely.
    When I say remotely, its installed on a server which my client accesses using Remote Desktop Connection.
    As a company policy, we have to have our clients install a universal printer driver on any PC that needs to print anything created on the remote connection, and this works ok for everything except my landscape reports printed from the ReportViewer. Portrait reports are fine. Landscape reports are processed, but the page usually comes out on the local printer with all its text missing. A logo I have on the report prints fine, and if I choose a different printer, I get a slight variation - I get some text, not all, and still get the logo, etc.
    As a temporary measure, I've written software to allow my client to print their reports without having to view them, and they're ok (they're converted to an image file, and sent to the printer that way). I've also written code so that they can email the reports to themselves, so this converts the report to PDF, and sends it. In EMF and PDF format, everything looks great! Its printing from the ReportViewer that is the problem.
    Any help/thoughts/advice is really appreciated.
    At home - VB.NET 2005/2008 Express, Visual Web Developer 2005 Express
    At work - VS 2008 Standard (VB)
    .NET 2.0/3.5


    Visual Studio Express Learning Centre | How do I videos | MSDN VB Express Forum | MSDN VB Developer Centre

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Location
    Manchester, England
    Posts
    255

    Re: [2008] ReportViewer remote landscape printing

    Does anybody have any thoughts on this at all?
    At home - VB.NET 2005/2008 Express, Visual Web Developer 2005 Express
    At work - VS 2008 Standard (VB)
    .NET 2.0/3.5


    Visual Studio Express Learning Centre | How do I videos | MSDN VB Express Forum | MSDN VB Developer Centre

  3. #3
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: [2008] ReportViewer remote landscape printing

    Hi,

    You could try something like this:

    vb Code:
    1. Dim tip As Type = reportViewer1.[GetType]()
    2.      Dim pr As FieldInfo() = tip.GetFields(BindingFlags.Instance Or BindingFlags.NonPublic)
    3.      Dim ps As New System.Drawing.Printing.PageSettings()
    4.      ps.Landscape = True
    5.    
    6.      For Each item As FieldInfo In pr
    7.          If item.Name = "m_pageSettings" Then
    8.              item.SetValue(reportViewer1, ps)
    9.            
    10.          End If
    11.      Next

    Hope it helps,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Location
    Manchester, England
    Posts
    255

    Re: [2008] ReportViewer remote landscape printing

    Thanks for your reply. Unfortunately, it hasn't made any difference.
    At home - VB.NET 2005/2008 Express, Visual Web Developer 2005 Express
    At work - VS 2008 Standard (VB)
    .NET 2.0/3.5


    Visual Studio Express Learning Centre | How do I videos | MSDN VB Express Forum | MSDN VB Developer Centre

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