|
-
Oct 3rd, 2005, 01:00 AM
#1
Thread Starter
Hyperactive Member
Crystal Reports RCR + temp files (RESOLVED)
Hello everybody
I`ve been using the Crystal Reports 10, RDC component in my application. The fact is that after executing my application CR 10 always leave these zero length temp files on the root folder of the drive from which the application was executed. Is there some way around this? I would like CR 10 to delete these files when it`s done!
Last edited by divined; Oct 20th, 2005 at 09:28 AM.
SteadFast!
-
Oct 3rd, 2005, 02:56 AM
#2
Re: Crystal Reports RCR + temp files
Maybe there are some object references not being destroyed when your app exits. CR 10 should clean up after itself, but you can't always rely on it. I've seen other apps do the same. Try setting all used object references to Nothing before your app exits.
Pete
No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.
-
Oct 3rd, 2005, 06:49 AM
#3
Re: Crystal Reports RCR + temp files
pnish has the best idea, but another idea might be to check for the existence of the files prior to your app's exist, and if found, delete them.
-
Oct 3rd, 2005, 01:08 PM
#4
Thread Starter
Hyperactive Member
Re: Crystal Reports RCR + temp files
I`ve thought of checking for the files just before my app terminates. But it`s not that of an elegant solution. I`ll check to see if I`m not setting all objects to Nothing in the morning.
-
Oct 5th, 2005, 01:15 AM
#5
Thread Starter
Hyperactive Member
Re: Crystal Reports RCR + temp files
This is the code I`m using to open the Crystal reports report.
VB Code:
' ' Set Datasource of RDC embedded designer
CrystalReport_anazhthshKlinikhsOnomasia.Database.SetDataSource rsKlinikh, 3, 1
' Set parameter
Set p1 = CrystalReport_anazhthshKlinikhsOnomasia.ParameterFields.GetItemByName("Title")
p1.AddCurrentValue (rsYphresia.Fields("Yphresia").Value)
' Set source of viewer control
CrViewer1.ReportSource = CrystalReport_anazhthshKlinikhsOnomasia
' Bind Parameters to report.
CrystalReport_anazhthshKlinikhsOnomasia.AutoSetUnboundFieldSource crBMTName
' No refresh
CrViewer1.EnableRefreshButton = False
' View report
CrViewer1.ViewReport
In the Unload event of my form, I execute the code :
VB Code:
' Clear parameter
p1.ClearCurrentValueAndRange
' Unload Designer
Unload CrystalReport_anazhthshKlinikhsOnomasia
Do I need to do something else in order to completely close the designer control?
-
Oct 5th, 2005, 01:38 AM
#6
Re: Crystal Reports RCR + temp files
I suggest that anywhere you've used Set to create an object reference, follow with a Set obj = Nothing when you've finished with it, eg
VB Code:
' Clear parameter
p1.ClearCurrentValueAndRange
' Destroy object reference
Set p1 = Nothing
' Unload Designer
Unload CrystalReport_anazhthshKlinikhsOnomasia
Pete
No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.
-
Oct 5th, 2005, 03:22 AM
#7
Thread Starter
Hyperactive Member
Re: Crystal Reports RCR + temp files
Unfortunately, I`ve set all these parameter objects to Nothing but am still getting these temp files.
-
Oct 5th, 2005, 03:59 PM
#8
Re: Crystal Reports RCR + temp files
I'm all out of ideas, sorry. Have you had a look on the Crystal web site? They've got a good FAQ section. Failing that, probably the best you can do is to get your app to delete these temp files when your app exits.
Pete
No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.
-
Oct 6th, 2005, 01:02 AM
#9
Thread Starter
Hyperactive Member
Re: Crystal Reports RCR + temp files
I found this article on the Business Objects knowledge base. Search for the article with the name
Temporary (Temp) files are being written to the incorrect directory
I`m using Windows XP. I checked and I do have these user variables defined, so I`m still baffled as to why Crystal Reports writes temp files to the system root.
-
Oct 6th, 2005, 01:09 AM
#10
Re: Crystal Reports RCR + temp files
Here you go, I just found this article which provides the answer to your problem:
http://support.businessobjects.com/l...s/c2015970.asp
Cheers
Pete
No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.
-
Oct 6th, 2005, 05:17 AM
#11
Thread Starter
Hyperactive Member
Re: Crystal Reports RCR + temp files
thank you pnish.
It seems that this update has newer dlls that resolve such issues. The fact is that I now need to make a new installer with these updated files. Thanks for your help!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|