none
Problem viewing multiple-column report in report viewer RRS feed

  • Question

  • I have created a report that has multiple columns.  I'm using ReportViewer in local mode on a WinForm.  When the report is generated on the screen, it only shows one column.  If I print the report, it also just prints one column.  When I export the file to a pdf document and open it, it shows all the columns.  How can I have all the columns show on the screen like the pdf document?  Is there a way to render the report on the screen in pdf?  If that is not possible, is there a way to automatically launch the report as a pdf document so it can be printed without the user having to export it first?  What I'm looking to avoid is forcing the user to export a report before it can be printed in the proper format.

    John
    Tuesday, March 3, 2009 4:48 AM

Answers

  • I solved my problem.  I noticed that if I click on the Print Layout button, all the columns show up and when I print, all the columns are printed.  So I added the following code to automatically set the view to Print Layout with a zoom percentage of 100%:

    Me.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
    Me.ReportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent
    Me.ReportViewer1.ZoomPercent = 100

    Hopefully this will help someone who has a similar problem to what I was having.

    John

    • Marked as answer by reichard2 Tuesday, March 3, 2009 6:45 AM
    Tuesday, March 3, 2009 6:45 AM