cancel
Showing results for 
Search instead for 
Did you mean: 

Exporttostream temp file left

former_member834793
Discoverer
0 Kudos

hi all,

crystal reports sp33

we are exporting a report to stream (pdf) with c#

like this:

using (ReportClass xyzReport = new XYZReport())
{

Stream st = xyzReport .ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
xyzReport.Close();
xyzReport.Dispose();
}

but in the users appdata\local\temp folder tmpXXX.tmp files are created (content is the pdf itself) but not deleted, the other temp files, that are created get recycled.

so the temp-directory is growing and growing.....

Accepted Solutions (1)

Accepted Solutions (1)

former_member834793
Discoverer
0 Kudos

no, they dont get deleted. but it seems, our problem is related to an unclosed stream.....

Answers (1)

Answers (1)

DonWilliams
Active Contributor
0 Kudos

If you close the app do all of the files get deleted?

And add the line to close the stream