Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

The system cannot find the path specified on ReportDocument.Export


I am getting the following error when I export a PDF report to disk.

System.Runtime.InteropServices.COMException (0x80004005): 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.FormatEngine.Export(ExportRequestContext reqContext)

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

My code is as follows:

_log.LogDebug(string.Format("Call Export: {0}", reportExportPath));

var diskOptions = ExportOptions.CreateDiskFileDestinationOptions();

diskOptions.DiskFileName = reportExportPath;

var formatOptions = new PdfRtfWordFormatOptions();

var exportOptions = new ExportOptions()


  ExportDestinationType = ExportDestinationType.DiskFile,

  ExportFormatType = ExportFormatType.PortableDocFormat,

  ExportDestinationOptions = diskOptions,

  ExportFormatOptions = formatOptions




Now I know my code is working as I have two services installed, the two services are just looking at different db schemas, so the RPT file is an exact copy except for the table locations that I have changed for the schema.

Any idea what it can be?

Former Member
Former Member replied

Ok, so after struggling with this issue for almost 3 days I changed the drivers of the DNS to use the "CR SQL Server Wite Protocol Driver 5.3" and not the "SQL Server Native Client 11.0" drivers.

Bang, reports is working and exporting faster than before.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question