Skip to Content
Former Member
Apr 02, 2015 at 09:23 AM

exporting ReportDocument fills up memory, then throws "The system cannot find the file specified"



When exporting a perfectly viable ReportDocument to pdf like this:

Dim ms As IO.MemoryStream = New System.IO.MemoryStream

ms = rpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)

(rpt being the ReportDocument), the process starts to fill up memory at a couple of megabytes per second rate, and eventually throws Exception:

"The system cannot find the path specified."


at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)

at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)

at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)

at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType)

at {the ExportToStream invocation in my own code}

The same thing happens when I invoke the regular Export() method with any DiskFileName.

My environment is VS 2012 (premium) and I'm using CRforVS_13_0_13 (32-bit version). The programming language is VB.NET.

A similar problem seems to be discussed here: , but the difference is there's no errors in my formula's. The report gets displayed and printed out fine. It's just the exporting that does not work. Any ideas about how to fix this?