cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports Viewer C# Winforms Asynchronous

Former Member
0 Kudos

I am having an issue where the crystal report viewer is locking up my application when it is loading a report. It locks up the parent form and the form the viewer is docked in. I am unable to minimize, maximize, or move these forms while the report is loading. It is running a report on about 1,000,000 records when I run it. I have found online on how to set the ASP.Net viewer to asynchronous, but there is nothing about making the C# Winforms version asynchronous. I need my app to be responsive while it is loading a report. I have tried using Task.Run() but the application form fails to load correctly and eventually closes. Application.Run will not work. I am using version 13.0.2000.0 of CrystalDecisions.Windows.Forms. Runtime verison for this library is 2.0.50727. I am in .Net framework 4.5.1 and using Visual Studio 2015.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Only way to do this is to fire off the viewer on a separate thread. See this KBA:

1455376 - How to launch reports on two separate threads



Ludek
Senior Support Engineer Product Support, Global Support Center Canada

Chat with an expert. How? See KBA 2213344 - Starting an Expert Chat with SAP Support [video]
Got questions? Visit the SCN Community: https://answers.sap.com
Follow me on Twitter @CRnAnalysisTips

Former Member
0 Kudos

I have done this and it does allow my main form to function while the report is loading, but I am still unable to move the form containing the viewer. Any ideas on how to prevent the form from locking up?

Also, if you are calling a form from a thread, you have to use ShowDialog() or else the form disappears immediately.

Answers (1)

Answers (1)

Former Member
0 Kudos

Well, I'm back to square 1. When spinning up a new thread for the viewer, you are unable to use the export functionality. When you click on Export, it locks the application and never returns (I left it over night to confirm).