Report Viewer Asynchronous thread abort error

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi All

I have a VB.net 2005 app which uses MS Report Viewer to create reports

Occassionally I get the following error when changing to a different report

User code running on thread 196 has attempted to abort thread 3560. This may
result in a corrupt state or resource leaks if the thread being aborted was
in the middle of an operation that modifies global state or uses native
resources. Aborting threads other than the currently running thread is
strongly discouraged.

The error occurs in
ReportViewer1_RenderingComplete event. Code below....

Try

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

Me.ReportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent
******** line where error occurs

mypath = ReportViewer1.LocalReport.ReportPath

If mypath = reportpath & "DailyCashFlow.rdlc" Or mypath = reportpath &
"Staff.rdlc" Or mypath = reportpath & "rebookings.rdlc" Or mypath =
reportpath & "SalesbyPaymentType.rdlc" Then

Me.ReportViewer1.ZoomPercent = 80

Else

Me.ReportViewer1.ZoomPercent = 90

End If

Catch ex As Exception

mymsgbox(ex.Message)

End Try

Any ideas

Regards

Steve


.