ActiveX control cannot be instantiated because the current thread is not in a single-threaded apartment
Posted on 2010-03-25
I get the error shown in the title of this question if I try to print a report with parameters. I can preview the report without a problem. I have found with searching the web:
You can work around this by creating a thread yourself and specifying the STA apartment state on the thread.
var t = new Thread(MyThreadStartMethod);
My question is - does this code need to be in Crystal Reports (where)? Or does this code need to be in the form in the application? The application uses business objects, methods...