Initial Zoom Level for Viewer

Stimulsoft Reports.NET discussion
Post Reply
admin@secsol.co.uk
Posts: 44
Joined: Wed Jun 01, 2022 8:26 am

Initial Zoom Level for Viewer

Post by admin@secsol.co.uk »

I have a Report Viewer on a form and set the initial zoom level to 1 = for 100% like this:

ReportViewer.Zoom = 1.0;

But the viewer appears to remember the last zoom level used and resets itself to this value instead of the 100%
admin@secsol.co.uk
Posts: 44
Joined: Wed Jun 01, 2022 8:26 am

Re: Initial Zoom Level for Viewer

Post by admin@secsol.co.uk »

If I set the zoom in the Shown() event like this:

ReportViewer.Zoom = 1.0;
ReportViewer.Refresh();

The report is zoomed to 100% but the zoom scroller at the bottom right show an incorrect value.
Lech Kulikowski
Posts: 7424
Joined: Tue Mar 20, 2018 5:34 am

Re: Initial Zoom Level for Viewer

Post by Lech Kulikowski »

Hello,

You can use the following code:
StiOptions.Viewer.Windows.Zoom = 1;

Thank you.
admin@secsol.co.uk
Posts: 44
Joined: Wed Jun 01, 2022 8:26 am

Re: Initial Zoom Level for Viewer

Post by admin@secsol.co.uk »

Hi,

This doesn't appear to work - it remembers the last zoom level and always goes back to that level.
Max Shamanov
Posts: 1025
Joined: Tue Sep 07, 2021 10:11 am

Re: Initial Zoom Level for Viewer

Post by Max Shamanov »

Hello,

Could you please check this issue with StiRibbonViewerControl?

Thank you.
admin@secsol.co.uk
Posts: 44
Joined: Wed Jun 01, 2022 8:26 am

Re: Initial Zoom Level for Viewer

Post by admin@secsol.co.uk »

Hi,

I am using the StiRibbonViewerControl.

I set the zoom level in the Form Shown event as I thought that if the Viewer is remembering its last setting that this would be after it had set itself.

private void StimulsoftReportViewerForm_Shown(object sender, EventArgs e)
{
StiOptions.Viewer.Windows.Zoom = 1;
}

But it still goes back to the last zoom level.
Lech Kulikowski
Posts: 7424
Joined: Tue Mar 20, 2018 5:34 am

Re: Initial Zoom Level for Viewer

Post by Lech Kulikowski »

Hello,

We couldn't reproduce the issue.
Please send us a sample project that reproduces the issue for analysis.

Thank you.
Post Reply