1
votes

I am implementing multithreading to show crystal Reports with Crystal Report Viewer, Done that successfully, but the form loaded is closing automatically, when I did not implement multithreading for the same I did not find any problem. The Code I am calling the reports is

objForm.ViewReport("~Path\CrystalReports\" & _ReportName, , _parameters)
objForm.Show()

ViewReport Calls a form - frmViewReport which has CrystalReportViewer

1

1 Answers

1
votes

Call objForm.ShowDialog() instead of Show()

What is happening is that the current thread that you are opening the objForm object on is ending and getting rid of everything on it. Calling ShowDialog will cause it to stay active until the Form is closed.