Skip to Content
avatar image
Former Member

when we do ExportToStream in CR, then IOException is occured

When we do CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream, then the Exception of IOException is occurred.

What can I do ?

Environment :

Windows Server 2012 R1 (Japanese)

ASP.NET + VB.NET (.NET Framework 4.0)

SAP Crystal Reports runtime engine for .NET Framework (64-bit) 13.0.20.2399

Stack Trace :

System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) System.IO.Path.InternalGetTempFileName(Boolean checkHost) CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext) CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options) CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType)

Info :

When this Exception is occurred, then We checked C:\Windows\Temp .

There were a lot of tmpXXXX.tmp files.

( XXXX is Hex code )

I couldn't remember accurately, but there were 65536 files of tmpXXXX.tmp.

After we deleted these files, this Exception is not occurred.

So we delete these files everyday.

CR 13.0.21 is also occurred this Exception.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Nov 17, 2017 at 04:57 PM

    Hi,

    I suggest debugging the issue using DebugDiag and capture the crash.

    Those temp files are created when CR needs to generate database links etc. and should be deleted when the report is object is closed().

    Make sure your app and IIS AppPool has full read/write permissions on the \temp folder.

    Don

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I used ReportDocument.Close() but forgot Stream.Dispose() of ExportToStream.

      When I used Stream.Dispose(), then the Issue has been resolved.

      And permissions are correct.

      Thank you !

      P.S.

      When I use ReportDocument.ExportToHttpResponse, then the same issue is occurred.

      So I think I'm going to use ExportToStream instead of ExportToHttpResponse.