none
Report Freezes on setting zoom to page width RRS feed

  • Question

  • I am setting the following dynamically when I call a report

     

    Code Snippet

    Dim z As New EMP_Reports

    z.whichReport = e.Node.Name

    z.Controls.RemoveByKey("TableLayoutPanel2")

    z.Show()

    z.ReportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout)

    z.ReportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth

    z.ReportViewer1.LocalReport.ReportEmbeddedResource = "EMP.EmployeeContact.rdlc"

    z.ReportViewer1.RefreshReport()

     

     

     

    When the above code executes, my form with the report viewer freezes up.

    I can delete the line of the zoommode and everything is fine.

     

    Is there a way to get around this, I would rather zoom the page for the user.

     

    Thanks

    Davids Learning

    Friday, April 25, 2008 4:18 AM

All replies

  •  

    Think I figured this one out

     

    Code Snippet

    Dim z As New EMP_Reports

    z.whichReport = e.Node.Name

    z.Controls.RemoveByKey("TableLayoutPanel2")

    z.Show()

    z.ReportViewer1.LocalReport.ReportEmbeddedResource = "EMP.EmployeeContact.rdlc"

    z.ReportViewer1.RefreshReport()

    z.ReportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout)

    z.ReportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth

     

     

     

     

    Seemed to work everytime

     

    Thanks for lookin

    Davids Learning 

    Friday, April 25, 2008 5:47 AM