Skip to Content
avatar image
Former Member

Crystal Reports Viewer C# Winforms Asynchronous

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Dec 23, 2016 at 06:09 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • avatar image
    Former Member
    Jun 20, 2017 at 05:20 PM

    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).

    Add comment
    10|10000 characters needed characters exceeded