Quantcast
Channel: Crystal Report Hosting News (SuperBlogAds Network) » crystal report hosting
Viewing all articles
Browse latest Browse all 17

Cystal Report Hosting :: Crystal Reports Generates Temporary Files

$
0
0

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.


Viewing all articles
Browse latest Browse all 17

Latest Images

Trending Articles





Latest Images