Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB does not unloads properly after opening Crystal Report

Status
Not open for further replies.

mw2403

Programmer
Apr 17, 2003
2
US
I have that problem for a while and it seems no solution. I open Crystal Report from VB6. VB application closes (unloads) itself properly, when it's run without using Crystal Reports. But as soon as I open Crystal Report from VB level, and then I would like to shut down the application closing all of the windows, VB application still hangs behind (even if it does not show on the screen) and never unloads completely. I have to go to Task Manager and end task. It seems acting like that only in the case when I use Crystal Reports in VB. It drives my nerves for some time. Does anyone have any clue of what solution could be?
 
Your problem is probably not directly related to Crystal Reports. What you're describing is a classic symptom of a COM object that was never set to Nothing, and that's what is keeping your exe from unloading.

Make sure that all objects are set to Nothing when you're done with them.
 
Hi mw2403,

I am trying to get a particular Crystal Report to open and then print through VB. I'm having problems just getting to the open part. I can get Crystal to open using the Shell command but can't get the particular file to open. Can you throw me some hints.

Thanks.
 
Since you ae trying to use VB to open a report, you should not be trying to shell CR itself.

Depending on the CR tool you are using will depend on how you make the preview call.

If you are using the RDC, you will need something like

crviewer.reportsource = report
crviewer.viewreport

Might want to check out the Crystal support site. There is lots of samples available for you to look at.


Cheers,

SurfingGecko
Home of Crystal Ease
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top