简体   繁体   English

尝试将报告源作为PDF .Net导出到磁盘时,Crystal Report Viewer使应用程序崩溃

[英]Crystal Report Viewer crashing an application when trying to export the report source to disk as a PDF .Net

I'm trying to export the reportsource of a crystal report viewer in .Net 1.1 onto disk as a PDF using 我正在尝试使用.Net 1.1将Crystal Report查看器的reportsource导出为磁盘上的PDF

CrystalDecisions.CrystalReports.Engine.ReportDocument cr = (CrystalDecisions.CrystalReports.Engine.ReportDocument)crvView.ReportSource;
cr.ExportToDisk(CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat, @"C:\Temp\Temp.pdf");

I know it's the "cr.ExportToDisk..." line thats failing, but dont know why. 我知道那是“ cr.ExportToDisk ...”行失败了,但不知道为什么。 Ive checked to make sure the Crystal Report versions are the same on the client machines and they are. 我已经检查以确保Crystal Report版本在客户端计算机上相同。

Sometime i get the message "Memory could not be read at source...." and the application completely crashes, and other times the app crashes without the message. 有时我收到消息“无法从源读取内存...。”,应用程序完全崩溃,而有时,应用程序崩溃而没有消息。

Any ideas on why this happens and how to fix it would be greatly appreciated. 任何关于为什么发生这种情况以及如何解决它的想法,将不胜感激。

Cheers 干杯

您可以检查以确保要尝试导出到的位置的安全权限相同。

Are you able to print these "faulty" reports? 您可以打印这些“故障”报告吗? If so, have you tried printing to CutePdf which might allow you to at least work around the issue temporarily. 如果是这样,您是否尝试过打印到CutePdf ,这可能至少可以让您暂时解决该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM