Crystal Reports Zoom property

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Blacky
    New Member
    • Jan 2009
    • 40

    Crystal Reports Zoom property

    hi,

    I have a form where in i dropped a crystal report viewer.I created a report sample.rpt and this is the code which binds my report to the viewer.

    Code:
     If (Session("rep") Is Nothing) Then
    
               LoadReport()
    
    
            Else
    
                rep = CType(Session("rep"), ReportDocument)
    
            End If
    
            CrystalReportViewer1.ReportSource = rep
    
            CrystalReportViewer1.DataBind()
    
    
     Sub LoadReport()
    
            Dim ds As New DataSet1
    
            Me.CrystalReportViewer1.PageZoomFactor = 100
    
    
            Dim dt = ds.DMT_REPORT_SPECIFICATION
    
            Dim ad As New SqlDataAdapter("select top 5 DRS_REPORT_ID,DRS_SYSTEM_ID,DRS_REPORT_NAME,DRS_REPORT_HEADER,DRS_REPORT_FOOTER from DMT_REPORT_SPECIFICATION", "Data Source=AMP-PRODUCTS;initial catalog=NT_Verzoenen_Dev;user id=recon_user; password=Password123")
    
            ad.Fill(dt)
    
            Session("Samplerpt") = dt
    
    
            rep.Load(Server.MapPath("CrystalReport.rpt"))
    
            rep.SetDataSource(dt)
    
            Session("rep") = rep
    
           End Sub

    On executing it, the report works fine.I get the output. When i change the Zoom level factor dropdown to 75% it shows the report with 75% zoom level.Again changing to any other zoom factor level.The report shows no effect its in the same 75% level. Kindly let me know how the zoom level factor affects the report.

    Thanks in advance.
    Blacky
    Last edited by Frinavale; May 27 '09, 02:00 PM. Reason: Added code tags (removed Bold tags). Please post code in [code] [/code] tags in the future.
Working...