cancel
Showing results for 
Search instead for 
Did you mean: 

The system cannot find the path specified on ReportDocument.Export

Former Member
0 Kudos

Hi

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

};

_log.LogDebug("Export");

cryRpt.Export(exportOptions);

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?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos


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.

Answers (0)