Reputation: 953
I am using C# winform reportviewer 2010.
I changed the default option to view reports to Print Layout (Whole page) with SetDisplayMode(). However since Whole Page is the default zoom option for print layout, even if I set the ZoomMode to PageWidth in the designer,when the report loads, it resets to Whole page. Is it possible to programatically set the ZoomMode to Page width after setting the displayMode?
Thanks
Upvotes: 8
Views: 26106
Reputation: 79
After reportViewer1.RefreshReport(); you can add
reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout); reportViewer1.ZoomMode=ZoomMode.PageWidth;
Upvotes: 0
Reputation: 65
After refresh your rdlc report write
my_Report.ZoomMode = ZoomMode.PageWidth;
my_Report.ZoomMode = ZoomMode.FullPage;
my_Report.ZoomMode = ZoomMode.Percent;
Upvotes: 1
Reputation: 1142
reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
Upvotes: 7
Reputation: 61
Maybe you can do like this:
Fill all report parameters
Then you refresh your report in order to show your data
myReport.RefreshReport();
Finally set this properties
myReport.ZoomMode = ZoomMode.Percent;
myReport.ZoomPercent = 100;
I hope it helps you.
Upvotes: 6
Reputation: 953
Nevermind, I figured zoomMode could be set this way:
this.reportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth;
Upvotes: 5