How to reset preview zoom to default

Stimulsoft Reports.NET discussion
mrapi
Posts: 282
Joined: Sat Dec 20, 2008 1:08 am

How to reset preview zoom to default

Post 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.

Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

How to reset preview zoom to default

Post by Jan »

Hello,

You can use following code:

Code: Select all

StiSettings.Load();
StiSettings.Set("Viewer", "Zoom", 1);
StiSettings.Save();
Thank you.
mrapi
Posts: 282
Joined: Sat Dec 20, 2008 1:08 am

How to reset preview zoom to default

Post 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 !
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

How to reset preview zoom to default

Post by Jan »

Hello,

Which version of report engine you are use?

Thank you.
mrapi
Posts: 282
Joined: Sat Dec 20, 2008 1:08 am

How to reset preview zoom to default

Post by mrapi »

My version :2009.2.456

Thanks.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

How to reset preview zoom to default

Post by Jan »

Hello,

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

Thank you.
mrapi
Posts: 282
Joined: Sat Dec 20, 2008 1:08 am

How to reset preview zoom to default

Post 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.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to reset preview zoom to default

Post 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.
mrapi
Posts: 282
Joined: Sat Dec 20, 2008 1:08 am

How to reset preview zoom to default

Post 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.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

How to reset preview zoom to default

Post by Jan »

Hello,

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

Thank you.
Post Reply