Page 1 of 1
Setting viewer zoom in code
Posted: Wed Jul 13, 2011 1:04 pm
by jmiller
I want to set the initial zoom factor of my report in the viewer. I can't seem to find any way to do this. I do not use the viewer control itself, but make a call to Show as a dialog form.
StiReport myReport;
...
myReport.Show(true);
Setting viewer zoom in code
Posted: Thu Jul 14, 2011 5:21 am
by HighAley
Hello.
jmiller wrote:I want to set the initial zoom factor of my report in the viewer. I can't seem to find any way to do this. I do not use the viewer control itself, but make a call to Show as a dialog form.
StiReport myReport;
...
myReport.Show(true);
For setting zoom level you can use next code.
Code: Select all
StiReport myReport;
StiOptions.Viewer.Windows.Zoom = 0.5; // 50% zoom
myReport.Show(true);
To set zoom level to 100% you must set Zoom property to 1.
Thank you.
Setting viewer zoom in code
Posted: Thu Jul 14, 2011 5:49 am
by jmiller
Worked perfectly! Thank you.
Setting viewer zoom in code
Posted: Thu Jul 14, 2011 5:52 am
by HighAley
We are always glad to help you.