Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal Report is not releasing the file handle.
Message
From
17/12/2000 16:51:54
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00454506
Message ID:
00454543
Views:
21
>I am having an error running a Crystal Report from my vfp application. When the report is run the 2nd time I get the vfp error 'file access denied'.
>
>Setup - I have a form on which the CR ocx is dropped. There is a preview button which does the data manipulation and generates a vfp free table. The CR report is setup to use the free table through ODBC. Before running the report I close the table.
>
>On the 1st run the report comes up fine but the 2nd run returns the vfp error. My analysis tells me the CR is not releasing the file.
>
>On contacting CR support I found out its a file lock problem and I have to release the ocx. So I used the createobject() command in the form. init. If I instiantiate the ocx from the button, the report preview closes opens and closes immediately.
>
>How do I release the ocx?
>
>In the init I have ThisForm.gpoObject = createobject(Crystal.CrystalReport).
>I get an error on Release ThisForm.gpoObject from the preview button.
>
>I am using CR 7.x on vfp 6.0
>
>TIA.

I haven't used the OCX for several years, and it really isn't the best solution. It is no longer being updated by Seagate Software. In the automation server, there is a reset method that clears everything out. You should check the documentation to see if the OCX has a similar method.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform