ReportViewer: Show reports in Print Layout with Page Width zoomMode
Asked Answered
U

5

8

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

Unwieldy answered 29/3, 2013 at 14:48 Comment(0)
K
6

Maybe you can do like this:

  1. Fill all report parameters

  2. Then you refresh your report in order to show your data

    myReport.RefreshReport();

  3. Finally set this properties

    myReport.ZoomMode = ZoomMode.Percent; myReport.ZoomPercent = 100;

I hope it helps you.

Krieg answered 1/5, 2016 at 4:36 Comment(0)
M
6

reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);

Mraz answered 18/8, 2017 at 15:24 Comment(0)
U
5

Nevermind, I figured zoomMode could be set this way:

this.reportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth;

Unwieldy answered 29/3, 2013 at 14:54 Comment(0)
L
1

After refresh your rdlc report write

my_Report.ZoomMode = ZoomMode.PageWidth;
my_Report.ZoomMode = ZoomMode.FullPage;
my_Report.ZoomMode = ZoomMode.Percent;
Lush answered 25/4, 2018 at 10:26 Comment(0)
C
0

After reportViewer1.RefreshReport(); you can add

reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout); reportViewer1.ZoomMode=ZoomMode.PageWidth;

Cop answered 26/8, 2019 at 9:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.