John Cassell
Well-known member
- Joined
- Mar 20, 2007
- Messages
- 65
- Programming Experience
- Beginner
Hi,
I have a report form which loads a tableadapter and then shows the report. I have been trying (using the background worker) to give the user an option of cancelling the Fill of the TB but it's not working and I was hoping someone could point out where I am going wrong.
I
My code is below, any help would be greatly appreciated..
'Run report
'Fill Tableadapter
'Cancel if needed
Also since using this backgroundworker. My report is showing less records than it should and every time I hit 'refresh' it displays extra records until it reaches the proper number..
Can anyone help pls?
Thanks
John
I have a report form which loads a tableadapter and then shows the report. I have been trying (using the background worker) to give the user an option of cancelling the Fill of the TB but it's not working and I was hoping someone could point out where I am going wrong.
I
My code is below, any help would be greatly appreciated..
'Run report
VB.NET:
Private Sub Run_Report_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Run_Report.Click
BackgroundWorker1.RunWorkerAsync()
Me.ReportViewer1.RefreshReport()
End Sub
VB.NET:
Private Sub BackgroundWorker1_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
Me.TBL_WS_JobsTableAdapter.Fill
End Sub
VB.NET:
Private Sub CancelRep_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancelRep.Click
BackgroundWorker1.CancelAsync()
End Sub
Also since using this backgroundworker. My report is showing less records than it should and every time I hit 'refresh' it displays extra records until it reaches the proper number..
Can anyone help pls?
Thanks
John