[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.
Re: [2008] ReportViewer remote landscape printing
Does anybody have any thoughts on this at all?
Re: [2008] ReportViewer remote landscape printing
Hi,
You could try something like this:
vb Code:
Dim tip As Type = reportViewer1.[GetType]()
Dim pr As FieldInfo() = tip.GetFields(BindingFlags.Instance Or BindingFlags.NonPublic)
Dim ps As New System.Drawing.Printing.PageSettings()
ps.Landscape = True
For Each item As FieldInfo In pr
If item.Name = "m_pageSettings" Then
item.SetValue(reportViewer1, ps)
End If
Next
Hope it helps,
sparrow1
Re: [2008] ReportViewer remote landscape printing
Thanks for your reply. Unfortunately, it hasn't made any difference.