I have several reports that all merge onto the same datatable. The user can click several to run and then hit the 'find records' button to run them all simultaneously. Since they each take so long, I'd like to update the user on the status bar as each of these stored procedures is called successfully. However, when I call the procedure, I only get one update at the very end listing everything.
What I'd like to do :
<!-- language: vb -->'Initialize Progress Components
repCompleted = 0
ProgressBar1.Minimum = 0
ProgressBar1.Maximum = repSel
ProgressBar1.Value = repCompleted
TextBlock2.Text = repCompleted & " of " & repSel & " reports finished"
Then as each report gets successfully run, update the repCompleted
value and refresh
repCompleted += 1
TextBlock2.Text = repCompleted & " of " & repSel & " reports finished"
ProgressBar1.Value = repCompleted
The problem is that these refreshes don't happen until I've exited the sub. I'd like it to count forward as each one finishes i.e. 1 of 4 completed
, 2 of 4 completed
, etc.
Any ideas?