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

deleting Crystal Reports temp files created in .NET application

Status
Not open for further replies.

toekneel

Programmer
Aug 10, 2001
96
US
We've been up and running with Crystal Reports deployed through .NET applications for about a year and a half. It just came to my attention that the temp files created by .NET when running a report are never deleted, they are simply stored in the temp folder. It seems that on one of the servers, it actually continues to hold the concurrent user as being active, even after many days since the report was run. While searching Business Objects web site, I see a few articles from back in 2001 and 2004 indicating it was a known bug in certain circumstances, but I don't see a fix anywhere. Can I programmatically delete the temporary files after the report has run? I'm not certain how I'd capture the name of that temporary file.
 
How is your report file generated. I programatically generating the report files as either pdf or doc files depending on user preference using the report engine object model from CR9. After that the files are deleted using the following code. Of course I already have FName since I created it.

Try
System.IO.File.Delete(FName)
Catch e As System.IO.IOException
ErrorFound = True
WriteToReportLog(CrystalEventID, CrystalReportName, "Error deleting temp file", e.message)
Catch e As System.Exception
ErrorFound = True
WriteToReportLog(CrystalEventID, CrystalReportName, "Error deleting temp file", e.message)

 
My report file is just that- an *.rpt that is generated at run time when it is displayed in the report viewing tool. Therefore, I have no file name to delete the temporary report.
 
I know what you are talking about, I've seen that issue before I believe using CR 9 (and CR.Net) on a terminal server. You can try scouring knowledge base, but it rather sucks, and their india support center is somewhat lacking, unless you can get to the tier 2 guys back in the US.

I think CR XI does a better job of managing those temp files. Atleast, I haven't had any complaints about them as of yet.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
We are using CR XI- the problem still exists. I've tried scouring the knowledge base already, and I'm glad to hear that I'm not the only one who feels that way about the Business Objects support center in India... when I've complained to our reps they make me feel like I'm the only one who has ever complained about them!
 
If you can, get a hold of one of the sales support reps, they can't fix your problems, but they can get you in phone/email contact with the US support. The US team is much closer in relation to the dev team, so they're a busy bunch, it's best if you have your ducks in a row before harassing them. ;)

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top