on 04-06-2016 4:57 PM
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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.