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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal 6 Error from VB 5 application

Status
Not open for further replies.

tfurman

Programmer
Dec 1, 2000
9
US
We are running crystal reports from an Active X connection in a VB application. There is one particular report that users print multiple times. After 20 prints, we get the following error...

ERROR NUMBER 20544
ERROR MESSAGE: Access to report file denied. Another program maybe using it.


We are invoking the print by using the action=1 method (cr.action = 1) from VB. After the report has printed, we clear the object with the reset method (cr.reset).

This error occur regardless if we printing to the printer or a window. It seems that a lock is being placed on the report file and not being removed unless the application is closed. Does anyone know how to release this lock, or have any other ideas or suggestions?

Thanks.
 
You might try:

cr.reset
DoEvents
DoEvents

Perhaps the reset just isn't done in time, sometimes, before you're printing again. Brian J. Alves
Email: brian.alves@worldnet.att.net
VB / ASP / Crystal / SQLServer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top