[Last Call] Learn how to a build a cloud-first strategyRegister Now

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

Updating the zoom view in a Crystal Reports in asp.net

I have a report in a asp.net page, the zoom is set initially in 100, but if it is changed, nothing happen and remain the initial set (100)
I tryied this:
  Protected Sub crViewer1_ViewZoom(ByVal source As Object, ByVal e As CrystalDecisions.Web.ZoomEventArgs) Handles crViewer1.ViewZoom
          Me.crViewer1.Zoom(e.NewZoomFactor)
 End Sub
But an application error happened:
http://www.experts-exchange.com/Web_Development/WebApplications/Q_23399688.html

Is there another way for updating the zoom?

Thanks!
0
aslyas
Asked:
aslyas
1 Solution
 
mlmccCommented:
0
 
aslyasAuthor Commented:
I got an error if I did it from command button, but I solved it updating the zoom from the bindReport function:

Protected Sub BindReport(ByVal reporte As String)
        If oRpt Is Nothing Then oRpt = New ReportDocument
        Dim zoom As Integer = CInt(txtZoom.Text)
        Try            oRpt.Load(Server.MapPath(reporte))
            oRpt.SetDataSource(dsData)
            Me.crViewer1.ReportSource = oRpt              
            Me.crViewer1.DataBind()
            Me.crViewer1.Zoom(zoom)
        Catch ex As Exception
        End Try
    End Sub

I will give you the points since you point me in the direction.

Thanks a lot!
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

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