Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 708
  • Last Modified:

CrystalReportViewer and Zoom

I am using the CrystalReportViewer on a form to show a report.  I know that you can use the Zoom method to set the zoom level.  For instance, CrystalReportViewer1.Zoom(75).

What I'd like to be able to do is save the zoom setting when the user closes the form and go back to this when the user next runs the report.

However, I can't seem to find a property that indicates the zoom level.

Is there a way of doing this?

I am using VB 2005, but I'd imagine it might be the same for earlier versions.

Thanks,
Chris
0
chlade
Asked:
chlade
  • 2
  • 2
1 Solution
 
Brian CroweDatabase AdministratorCommented:
You might consider saving the value in the application config file.  I use it to save things like the previous size and location of the application, etc.
0
 
chladeAuthor Commented:
That's exactly what I want to do.  My question is how do I  _get_ the value so that I can save it.
0
 
PockyMasterCommented:
ReportViewer.ZoomPercent ?
0
 
Brian CroweDatabase AdministratorCommented:
I misunderstood your question.  Use the ViewZoom event to record the new zoomlevel whenever it changes.

Private Sub CrystalReportViewer1_ViewZoom(ByVal source As Object, _ ByVal e As CrystalDecisions.Windows.Forms.ZoomEventArgs) _
   Handles _ CrystalReportViewer1.ViewZoom
   messagebox.show(e.NewZoomFactor.ToString)
End Sub
0
 
chladeAuthor Commented:
I had just figured out a way of doing it whereby I was parsing the 3rd panel of the status bar.  This was a bit clunky.  You'd think there would be a property such as ZoomPercent but there doesn't appear to be.

BriCrowe, I like your method better than mine.  Thanks!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now