Results 1 to 11 of 11

Thread: Crystal Reports RCR + temp files (RESOLVED)

  1. #1

    Thread Starter
    Hyperactive Member divined's Avatar
    Join Date
    Aug 2004
    Location
    Thessaloniki, Greece
    Posts
    447

    Resolved 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!

  2. #2
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    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.

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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.

  4. #4

    Thread Starter
    Hyperactive Member divined's Avatar
    Join Date
    Aug 2004
    Location
    Thessaloniki, Greece
    Posts
    447

    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.
    SteadFast!

  5. #5

    Thread Starter
    Hyperactive Member divined's Avatar
    Join Date
    Aug 2004
    Location
    Thessaloniki, Greece
    Posts
    447

    Re: Crystal Reports RCR + temp files

    This is the code I`m using to open the Crystal reports report.

    VB Code:
    1. ' ' Set Datasource of RDC embedded designer
    2.   CrystalReport_anazhthshKlinikhsOnomasia.Database.SetDataSource rsKlinikh, 3, 1
    3.  
    4.   ' Set parameter
    5.   Set p1 = CrystalReport_anazhthshKlinikhsOnomasia.ParameterFields.GetItemByName("Title")
    6.   p1.AddCurrentValue (rsYphresia.Fields("Yphresia").Value)
    7.    
    8.   ' Set source of viewer control
    9.   CrViewer1.ReportSource = CrystalReport_anazhthshKlinikhsOnomasia
    10.  
    11.   ' Bind Parameters to report.
    12.   CrystalReport_anazhthshKlinikhsOnomasia.AutoSetUnboundFieldSource crBMTName
    13.  
    14. ' No refresh
    15.   CrViewer1.EnableRefreshButton = False
    16.  
    17.   ' View report
    18.   CrViewer1.ViewReport

    In the Unload event of my form, I execute the code :

    VB Code:
    1. ' Clear parameter
    2.   p1.ClearCurrentValueAndRange
    3. ' Unload Designer
    4.   Unload CrystalReport_anazhthshKlinikhsOnomasia

    Do I need to do something else in order to completely close the designer control?
    SteadFast!

  6. #6
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    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:
    1. ' Clear parameter
    2.   p1.ClearCurrentValueAndRange
    3. ' Destroy object reference
    4.   Set p1 = Nothing
    5. ' Unload Designer
    6.   Unload CrystalReport_anazhthshKlinikhsOnomasia
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  7. #7

    Thread Starter
    Hyperactive Member divined's Avatar
    Join Date
    Aug 2004
    Location
    Thessaloniki, Greece
    Posts
    447

    Re: Crystal Reports RCR + temp files

    Unfortunately, I`ve set all these parameter objects to Nothing but am still getting these temp files.
    SteadFast!

  8. #8
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    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.

  9. #9

    Thread Starter
    Hyperactive Member divined's Avatar
    Join Date
    Aug 2004
    Location
    Thessaloniki, Greece
    Posts
    447

    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.
    SteadFast!

  10. #10
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    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.

  11. #11

    Thread Starter
    Hyperactive Member divined's Avatar
    Join Date
    Aug 2004
    Location
    Thessaloniki, Greece
    Posts
    447

    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!!!
    SteadFast!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width