Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. COThanks for your explanation. Can you provide some example for doing this? I am a bit confused. There are only 2 loops in this case. SalesHeader & SalesDetail. In each loop, I use `int percents = ((i + 1) * 100) / salesDetailArr.Count;` to get the percentage and `backgroundWorker.ReportProgress(percents, i);` to report progress. However, It doesn't report back to `backgroundWorker_ProgressChanged` method and progress bar increment remains at 0. Inside the second loop, when the program executes the ImportSalesDetail() method, it increases to 50. May I know what I have done wrong?
      singulars
    2. COHave you added the delegate.I suggest you remove the % thing and go on with the method i have suggested. Although it might not display exact progress,it does report progress and there is no need for 'backgroundWorker.ReportProgress'
      singulars
    3. COI marked your answer as a correct answer. I used this formula to find the progress percentage. `int findPercentage = ((i + 1) * 100) / salesHeaderArr.Count;` from this, I get the progress percentage. `progress = 0` I reset the progress to 0. `progress += findPercentage / 2;` There are 2 loops in my program. So, I divided by 2. So, if the first loop completes running, I will get 50%. In another loop. I use the same formula but here 'progress += (findPercentage / 2) + 50;' I added 50 from the first loop. Now with your help, I have finished my implementation. Thank you.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload