Viewer in new thread

Stimulsoft Reports.WPF discussion
Post Reply
Niqu
Posts: 81
Joined: Wed Aug 08, 2012 9:08 am

Viewer in new thread

Post by Niqu »

Hello again,

Maybe I am missing something or I am doing something terrible wrong - so sorry if it is true :)
I want to show "Viewer" in new thread. I did sample aplication. When I am running my code I got some strange exceptions (that something is my new thread is missing).
Why I want viewer in new thread? When I run "Viewer" in the main thread, the application stops being responsive (I can not click anything with the mouse). I want to despite of running "Viewer", my application to be still responsive. I thought to run "Viewer" in a new thread, but apparently encountered some difficulties.
I would add that I want to be able to run even a few "Viewer", so that the application was still responsive.

Thank you in advance for your help.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Viewer in new thread

Post by HighAley »

Hello.

Please, try to use next code:

Code: Select all

StiReport r = new StiReport();
r.Load("Report.mrt");
r.RenderWithWpf(false);
r.ShowWithWpf();  
Thank you.
Niqu
Posts: 81
Joined: Wed Aug 08, 2012 9:08 am

Re: Viewer in new thread

Post by Niqu »

Seems working. Thank you.
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Re: Viewer in new thread

Post by Andrew »

Hello,

Thank you for letting us know about this.
Post Reply