Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7678895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:45:05+00:00 2026-05-31T17:45:05+00:00

I have a Winforms application that schedules some work using a service. The service

  • 0

I have a Winforms application that schedules some work using a service. The service has a callback that updates the database with the work proceedings.

Now let’s say I schedule x work items. After the x work items are all completed, I want to generate an HTML report about the work statistics. I think the only way I can check the work completion of all items is to see their completion statuses in the database.

Can someone tell me how and when I can generate the HTML report? I think I can use a thread to poll the db to see if all work completed and inform UI to generate the report, but don’t know how to implement that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T17:45:06+00:00Added an answer on May 31, 2026 at 5:45 pm

    You can use BackgroundWorker component for waiting async task completed. It’s easy.
    First – drag BackgroundWorker from Toolbox to your form.

    Second – when you start processing (e.g. on button click event) add following code:

    private void button_Click(object sender, EventArgs e)
    {
        backgroundWorker1.DoWork += backgroundWorker1_DoWork;    
        backgroundWorker1.RunWorkerCompleted += backgroundWorker1_RunWorkerCompleted;
        backgroundWorker1.RunWorkerAsync();
    }
    

    Next – add to DoWork event handler code that starts processing and polling database:

    private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
    {
        // schedule some work
        // poll database
    }
    

    And last – add RunWorkerCompleted handler, which will run just after DoWork completed (i.e. all tasks updated their state in database):

    private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
    {
        // generate report
    }
    

    Thats it. Btw BackgroundWorker could report progress during polling database. Little searching will help you how to do that 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an winforms application that was built using MVC. The controller is subscribing
I have a WinForms application that requires some configuration which I do at install
I have a .NET WinForms application that I've converted into a COM dll using
I have a simple winforms application that I am connecting to my database with
I have a WinForms Application that I want to run at Mono at some
I have a winforms application that has one tabcontrol with 2 pages. On both
I have a c#/winforms application that uses directx to play some video and audio.
I have a WinForms application that, at some point, will do some calculations that
Using VB.net 4.0 I have a Winforms application that is loosely based on MVVM.
I have written a .net winforms application that does some heavy processing and slows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.