R
Ryan Gregg
I've got a background service running that needs to check a database
periodically and print reports whenever it finds that the data has changed.
I've built a class library that scans the database for the changes, and then
generates a report using the VS.NET 2003 version of Crystal Reports, and
prints the report. It works just fine when I use it in a single threaded
environment.
However, when I build an application that uses a System.Threading.Timer
object to run this method on a set schedule, anytime I try to work with the
report objects, the thread just hangs and never comes back
Is there some threading issue in Crystal Reports that anyone knows about, or
better yet, is there some way in C# to get back on the main execution thread
so that I can work with the reports there, avoiding this problem? Remember,
this is all running in a service or a console app, so I don't have a windows
form I can call Invoke or BeginInvoke on.
Thanks!
Ryan Gregg
periodically and print reports whenever it finds that the data has changed.
I've built a class library that scans the database for the changes, and then
generates a report using the VS.NET 2003 version of Crystal Reports, and
prints the report. It works just fine when I use it in a single threaded
environment.
However, when I build an application that uses a System.Threading.Timer
object to run this method on a set schedule, anytime I try to work with the
report objects, the thread just hangs and never comes back
Is there some threading issue in Crystal Reports that anyone knows about, or
better yet, is there some way in C# to get back on the main execution thread
so that I can work with the reports there, avoiding this problem? Remember,
this is all running in a service or a console app, so I don't have a windows
form I can call Invoke or BeginInvoke on.
Thanks!
Ryan Gregg