Page 1 of 2

How to reset preview zoom to default

Posted: Tue Jul 21, 2009 3:28 am
by mrapi
Hi ! I need to reset preview zoom to default/100%
If user set zoom to 75% for a report this value remains for the next preview,how to rest it to default ?
Thanks.


How to reset preview zoom to default

Posted: Tue Jul 21, 2009 6:49 am
by Jan
Hello,

You can use following code:

Code: Select all

StiSettings.Load();
StiSettings.Set("Viewer", "Zoom", 1);
StiSettings.Save();
Thank you.

How to reset preview zoom to default

Posted: Tue Jul 21, 2009 7:14 am
by mrapi
Thanks but sorry, this doesn't work for me
I'using this code
StiSettings.Load()
StiSettings.Set("Viewer", "Zoom", 1)
StiSettings.Save()

Dim wRp As New StiReport
wRp = StiReport.GetReportFromAssembly("myrepo.dll")
.....................
Using wform As Stimulsoft.Report.Render.StiPreviewForm = New Stimulsoft.Report.Render.StiPreviewForm(wRp)
wRp.Render()
wform.ShowDialog()
End Using
report is shown at 75%zoom
Thanks !

How to reset preview zoom to default

Posted: Tue Jul 21, 2009 8:07 am
by Jan
Hello,

Which version of report engine you are use?

Thank you.

How to reset preview zoom to default

Posted: Tue Jul 21, 2009 12:48 pm
by mrapi
My version :2009.2.456

Thanks.

How to reset preview zoom to default

Posted: Mon Jul 27, 2009 3:44 am
by Jan
Hello,

In which place of your application you have try use this code?

Thank you.

How to reset preview zoom to default

Posted: Mon Jul 27, 2009 4:18 am
by mrapi
The code you suggested is placed just before compiled report is loaded,when user select a menu option,more details at post #3

Thanks !
Jan wrote:Hello,

In which place of your application you have try use this code?

Thank you.

How to reset preview zoom to default

Posted: Tue Jul 28, 2009 1:15 am
by Edward
Hi

Please place it in a very beginning of your application when none of the report objects have been created.

You should do it in the program.cs before initializing of the application forms.

Thank you.

How to reset preview zoom to default

Posted: Tue Jul 28, 2009 2:10 pm
by mrapi
No, not solved the problem.
Placing this code at very beginning will reset zoom to default after each preview if application is not closed?
I'm using the code just before each preview and it seems the report is shown at 100 % zoom but in left corner
slider is at 75%.
Thanks.

Edward wrote:Hi

Please place it in a very beginning of your application when none of the report objects have been created.

You should do it in the program.cs before initializing of the application forms.

Thank you.

How to reset preview zoom to default

Posted: Wed Jul 29, 2009 2:06 am
by Jan
Hello,

Please create sample project which demonstrate problem and send it to support@stimulsoft.com.

Thank you.