Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal Report is not releasing the file handle.
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Crystal Report is not releasing the file handle.
Miscellaneous
Thread ID:
00454506
Message ID:
00454506
Views:
86
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.
Next
Reply
Map
View

Click here to load this message in the networking platform