|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Report Viewer Asynchronous thread abort errorI 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 Hi Steve,
Based on my understanding, you get an error occassionally when changing a different report for a ReportViewer control in your VB.NET 2005 WinForms application. If I'm off base, please feel free to let me know. You have mentioned that it is when you're trying to change a different report in the ReportViewer that you get an error. But the sample code you demonstrate doesn't change the current report in the ReportViewer control at all. I have performed a test based on your sample code but didn't reproduce the problem you described. FYI, to change the report in a ReportViewer control, you could set the ReportViewer. LocalReport.ReportPath property to the file path of a different .rdlc file. Note that you must call the ReportViewer control's Reset method to reset the ReportViewer before you attach a different report to it. If the problem still exists, you may send your sample project that could just reproduce the problem to me. To get my actual email address, remove 'online' from the displayed email address. Sincerely, Linda Liu Microsoft Online Community Support ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. Hi Linda
Sorry about the lack of detail In another routine I reset the the Reportviewer then set it to a local path ..rdlc then populate the datasource e.g ReportViewer1.Reset() ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local If ReportViewer1.LocalReport.DataSources.Count > 0 Then ReportViewer1.LocalReport.DataSources.RemoveAt(0) End If sql = "SELECT * from customers order by surname" dtsales = getdata(sql) dtsales.Columns.Add("myheading", GetType(System.String)) If dtsales.Rows.Count > 0 Then dtsales.Rows(0)("myheading") = "All Customers" End If ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WinForms.ReportDataSource("GeePosDataSet_Customers", dtsales)) ReportViewer1.LocalReport.ReportPath = reportpath & "Customers.rdlc" ReportViewer1.RefreshReport() I only get the error on 1 computer and I beginning to suspect it may have some hardware issues. I also only get the error when running the code from within VB IDE not from running the application .exe Regards steve Show quoteHide quote "Linda Liu [MSFT]" <v-l***@online.microsoft.com> wrote in message news:Fmyq9p1FHHA.856@TK2MSFTNGHUB02.phx.gbl... > Hi Steve, > > Based on my understanding, you get an error occassionally when changing a > different report for a ReportViewer control in your VB.NET 2005 WinForms > application. If I'm off base, please feel free to let me know. > > You have mentioned that it is when you're trying to change a different > report in the ReportViewer that you get an error. But the sample code you > demonstrate doesn't change the current report in the ReportViewer control > at all. > > I have performed a test based on your sample code but didn't reproduce the > problem you described. > > FYI, to change the report in a ReportViewer control, you could set the > ReportViewer. LocalReport.ReportPath property to the file path of a > different .rdlc file. Note that you must call the ReportViewer control's > Reset method to reset the ReportViewer before you attach a different > report > to it. > > If the problem still exists, you may send your sample project that could > just reproduce the problem to me. To get my actual email address, remove > 'online' from the displayed email address. > > > Sincerely, > Linda Liu > Microsoft Online Community Support > > ================================================== > Get notification to my posts through email? Please refer to > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > ications. > > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues > where an initial response from the community or a Microsoft Support > Engineer within 1 business day is acceptable. Please note that each follow > up response may take approximately 2 business days as the support > professional working with you may need further investigation to reach the > most efficient resolution. The offering is not appropriate for situations > that require urgent, real-time or phone-based interactions or complex > project analysis and dump analysis issues. Issues of this nature are best > handled working with a dedicated Microsoft Support Engineer by contacting > Microsoft Customer Support Services (CSS) at > http://msdn.microsoft.com/subscriptions/support/default.aspx. > ================================================== > > This posting is provided "AS IS" with no warranties, and confers no > rights. > Hi Steve,
Thank you for your reply and the detailed information. Since the problem only exists when it is run under VS IDE on one pc, you may check what the differences are in the particular machine and other machines. Hope this helps. Sincerely, Linda Liu Microsoft Online Community Support
Email Socket Question
Best way to get a Junior Programmer up to speed Exposing Com Interfaces of a .Net Class Library (Trouble Regsvr32) Fastest String search Combo box to start at first character after user selects Find Window Question NNTP Question Problems reading a text file in VB 6.0 Access and SQL server update vbc : Command line (0,0) : error BC2006: option 'r' requires':<file_list>' |
|||||||||||||||||||||||