I have a process that gets specified criteria, fills a dataset, and passes the dataset to a sub that prints a crystal report directly to the printer. Filling the dataset takes only milliseconds but printing the report takes a few seconds, I would like to do the printing in a background thread so I can continue onto the next record without waiting for it to complete.
Get criteria
Fill DataSet
Print Report
Clear Dataset
Start Over
My problem is when I attempt to use a background worker; it continues on past the print report process and clears the dataset. The background sub then throws an error due to the empty dataset. I have tried several different options including dataset.copy into a new dataset but continue to get the same results.
Can anyone provide some suggestions/examples or a better way of handling this?
Get criteria
Fill DataSet
Print Report
Clear Dataset
Start Over
My problem is when I attempt to use a background worker; it continues on past the print report process and clears the dataset. The background sub then throws an error due to the empty dataset. I have tried several different options including dataset.copy into a new dataset but continue to get the same results.
Can anyone provide some suggestions/examples or a better way of handling this?