Howto force Report Viewer to be shown in print preview mode

FerranB picture FerranB · Feb 16, 2009 · Viewed 14k times · Source

In Visual Studio 2005, how can I show a report in ReportViewer control directly on Print-preview mode?

Answer

lc. picture lc. · Feb 16, 2009

Use the SetDisplayMode() method:

MyReportViewer.SetDisplayMode(DisplayMode.PrintLayout);