FerranB
FerranB

Reputation: 36837

Howto force Report Viewer to be shown in print preview mode

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

Upvotes: 10

Views: 16276

Answers (2)

dinesh782
dinesh782

Reputation: 15

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.

Upvotes: 0

lc.
lc.

Reputation: 116538

Use the SetDisplayMode() method:

MyReportViewer.SetDisplayMode(DisplayMode.PrintLayout);

Upvotes: 26

Related Questions