title: How to stop crystal reports loading in the background in vb/c# .net
body: <p>Here's the problem i'm running into (VS 2010, .net 3.5, Crystal Reports 2008):</p>
  
  <p>I've got a form, frmReports, that has a CrystalReportsViewer control on it. This form is instanced by a button_click from another form. Upon loading frmReports loads a report document into the viewer, which takes at least 3 minutes to display (the efficiency is not in question here; the database is very large and the report uses a stored procedure).</p>
  
  <p>For this reason i have created a background worker that checks for a keyboard combination. This is supposed to prompt the user that he has chosen to interrupt the loading, dispose of everything and close the form (frmReports).</p>
  
  <p>Everything works very well, the key event is sent, the user is notified(the background worker is disposed properly), but after pressing OK to close the messagebox, the main thread remains locked (i cannot do anything on any form).</p>
  
  <p>I've used ANTS memory profiler and all the CrystalDecisions assemblies are still loaded into the memory, and the report document is actually still working in the background.</p>
  
  <p>I've tried <code>crViewer.ReportSource.Close()</code>, setting it to = <code>nothing</code>, <code>ReportSource.Database.Dispose()</code>, changing the <code>AppDomain</code> and unloading the assemblies, forcing <code>GC.Collect()</code>, and many combinations, and NOTHING WORKED - the report still doesn't release its resources and keeps on trying to load in the background (i think in some unmanaged thread as pausing my program doesn't interrupt anything).</p>
  
  <p>Is there any way to properly unload everything Crystal Reports loaded?
  Or to forcibly close the connection to the database - the connection crystal reports makes with the database (to run the attached stored procedure)?</p>