cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Export Error - The file is in use by another application

Former Member
0 Kudos

When running two Crystal reports, I'm currently seeing the attached error "The file is in use by another application". This issue started to occur mid/late July 2015. This issue is only occurring on 4 machines. The problem machines we replicated the issue on currently has all anti-virus software disabled and there hasn't been any automated processes or scheduled tasks currently running on the machines. When the user logs into another machine that doesn't see this issue, these two reports are able to be previewed and printed as well. The problem machines are running Windows 7 and are 32 bit machines. The machines seeing this issue have always ran Windows 7.

Items completed on one of the problem machines:

1) Reinstalled the Crystal .NET SP3 runtime

2) Reinstalled the XML parser

3) Reinstalled the XML driver

4) Gave full read/write permissions to the c:\xml folder for all users  (This is were the Crystal temporary files are written out to)

6) Made sure an ODBC connection to the databases is able to be made from the problem workstation

7) Confirmed that this issue wasn't associated with a Windows User Profile corruption issue

😎 Changed the default printer on the problem machine and that didn't resolve this issue

One of the reports was last changed on 1/9/2015 and the other report was last changed on 4/20/2015.

Do you know what this issue could be associated with? What steps would you recommend be completed to resolve this issue?

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

This happens when the file that you're trying to export to is open in another application.  For example, if an xls file is open in Excel, then you can't export over the top of it from Crystal, just like you can't delete it it's open.

-Dell

Former Member
0 Kudos

Thanks Dell for the quick response.   For this case, this file is being called/executed directly within an ERP system and the report file wouldn't be opened for any other reason by anyone. Based on this, what would be the best way to confirm which application currently has that file open?

former_member183750
Active Contributor
0 Kudos

Your best bet is to ask the author of the ERP system. We don't know how the CR APIs were implemented in the ERP so it's very hard to troubleshoot the issue.

The closest I find re. a similar error on export of a report is the following KBA:

1892901 - Unexpected error when multiple threads access the same Crystal Report with ExportToStream ...


And even if the description in the KBA was identical, without the source code, you would not be able to resolve the issue anyhow. E.g.; the author of the ERP should be your next stop.





- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow me on Twitter

Former Member
0 Kudos

Thanks Ludek.  It looks like the KBA you have mentioned could be related to this issue but it's referring to multiple sessions accessing the same export file (i.e. there is more than one export process running at the same time on the workstation). Currently, in this case, there is only one session running.  Do you have any additional toughts as to what may be causing this issue if there is only one session running on the machine?

DellSC
Active Contributor
0 Kudos

If someone has the file open in another application you would also see the same message.

-Dell

Former Member
0 Kudos

Thanks Dell.  The report file currently being called is only being called by one application.  What is the best way to check which other application may be using that file as well? 

former_member183750
Active Contributor
0 Kudos

To troubleshoot this I'd reboot the computer, then run the app as the very 1st thing. Do you still get the error? If you do, what software that might be loading the report(s) loads on startup?

If you do not get the error, what other software that may load the report is used on that computer?

You could use Process Monitor and see which software loads the CR runtime. This will be a very arduous exercise as you want to run ProcMon without any filters. This will result in pretty sizable logs to go through. But searching for crpe32.dll or crystalDecisions,crystalreports.engine may tell you which apps are loading the runtimes.

- Ludek

Former Member
0 Kudos

The error is still being displayed after the machine has been rebooted and the app is ran first thing.  I had our customer manually verify the Crystal reports within Crystal developer as well. Do you have any documentation on the running the Process Monitor to track down this issue?

DellSC
Active Contributor
0 Kudos

Try this:

Copy the report from it's current location to a new, possibly local, folder.

If you can open this copy of the report in Crystal, then the report is ok.  From here I would delete the old copy of the report in the original location - if it won't delete you may get some information about who has it open - and then copy the copy from the step above out to where the original folder.

If you can't open the copy, then I suspect that the report is corrupted and the error isn't giving the correct information.

-Dell

Former Member
0 Kudos

Thanks Dell. The error is still being displayed after I completed the items you mentioned on 10/6.  The reports were able to be opened up ok within Crystal developer, so the reports aren't currently corrupted.  I was also able to delete the reports prior to placing the copy of the reports back into the original location.  Do you have any other thoughts that could resolve this issue?

former_member183750
Active Contributor
0 Kudos

Look at the %TEMP% directory for this user. Delete any temp files and see if that helped.

Rename the report and see if it will load when renamed(?).

- Ludek

Former Member
0 Kudos

Thanks Ludek.  This issue has been resolved.  Our customer uninstalled McAfee antivirus and installed Norton Antivirus on the problem client workstations and that resolved this issue. Thanks Ludek and Dell for all of the feedback regarding this issue.

Answers (0)