How to remove tmp files in Crystal Reports 8.5

5 pts.
Tags:
Crystal Report 8.5
Crystal Reports
Temporary files
VB 6
Visual Basic 6
Hi, I develop an application in vb6 + crystal report 8.5. whenever i run a report application generate tmp file with 0k. how can i remove these files. Regards.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Crystal Reports may generate some temporary files (‘*.tmp’, ‘*.rpt’) in a temp folder (typically the c:\windows\temp folder or you temp folder in “Local Settings”). This is not a big deal because these files are quite small (between 0k and 200k for the ones I have seen during my investigations) but it can be a potential problems as they are very numerous (till 10 for a single export) and contains some potentially sensitive information (some data of your exports).

I have seen that these files are generated by the following methods:

SetDataSource
ExportToStream
How to correct this problem ?

Be sure to call the “Close()” method on your report object. This will automatically delete all the temporary generated files. In fact almost all of them as you will still have a “temp_xxx.rpt” file generated, even if you call the ExportToStream method.
Be sure to call the “Dispose()” method so Crystal Reports will release all the locks it may have on the object and the last generated file will be deleted
Of course, you could call only the “Dispose()” method as it will call internally the “Close()” method, or even not calling any of them but using the “using” syntax

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • djjaam
    The Dispose() method in'st available in VB6 + CR8 or CR9...
    50 pointsBadges:
    report
  • djjaam
    In fact, the Dispose() method is availabe in .NET versions...
    50 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following