10

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

FerranB
  • 35,683
  • 18
  • 66
  • 85

2 Answers2

25

Use the SetDisplayMode() method:

MyReportViewer.SetDisplayMode(DisplayMode.PrintLayout);
lc.
  • 113,939
  • 20
  • 158
  • 187
0

In Windows Forms application if you call the SetDisplayMode method in reportviewer's RenderingComplete event it may cause StackOverflowException. It is not correct place to call the method.

dinesh782
  • 15
  • 3