Report Preview zoom issue

Stimulsoft Reports.NET discussion
Post Reply
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Report Preview zoom issue

Post by Brendan »

If you call the following:

Code: Select all

StiReport blankReport = new StiReport();
blankReport.Render(false);
blankReport.Show();
blankReport.SaveDocument(@"S:\Documents\BlankReport.mdc");
The zoom function on the preview control does not seem to work. The border in the preview seems to increase but the page zoom doesn't seem to adjust.
The only way to trigger it back to normal seems to be if you click on the full screen button or click on one of the page view mode buttons.

This issue seems to be present in 2009 and 2010 builds but I think it's now fixed in a 2010.2 pre-release.
Is there any known workaround to restoring the zoom state?

Currently I have tried doing the following and it seems to work but I'm unsure how reliable or consistent it is:

Code: Select all

StiReport blankReport = new StiReport();
blankReport.Render(false);

Stimulsoft.Report.Viewer.StiViewerForm preview = new StiViewerForm(blankReport);
preview.Show();

preview.BeginInvoke((MethodInvoker)delegate() { preview.ViewerControl.Refresh(); });

blankReport.SaveDocument(@"S:\Documents\BlankReport.mdc");
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Report Preview zoom issue

Post by Ivan »

Hello,

Please check the next prerelease build from 12-Jul-2010 when it will be available and let us know about the result.

Thank you.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Report Preview zoom issue

Post by Brendan »

Hi,

I think the problem has already been fixed in one of the earlier pre-release builds.

I'm just wondering is there any property setters or method calls I can do on the viewer to workaround the issue in 2009 or 2010.1 builds?
If not I can stick to the BeginInvoke call it is currently doing. It seems to work but I'm just not sure how reliable it is on different machines.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Report Preview zoom issue

Post by Jan »

Hello Brendan,

You can try to set zoom level to specified value:

Code: Select all

StiSettings.Load();
StiSettings.Set("Viewer", "Zoom", 0.75);
StiSettings.Save();
75 % is default value. Also you can use own Viewer Form which can use Refresh function directly.


Thank you.
Post Reply