C#Crystal Report:无法转换为pdf一直说空异常

问题描述

我能够加载我的水晶报表,但是当我尝试导出为pdf时,它为我提供了空异常错误。我不知道错误在哪里。我所有的dll都已加载,我正在运行64位运行时[也尝试了32位。

this.cryRpt = new ReportDocument();    
this.cryRpt.Load(@"C:\Users\Name\Desktop\report.rpt");
DiskFileDestinationOptions CrDiskFileDestinationOptions = new DiskFileDestinationOptions();
PdfRtfWordFormatOptions CrFormatTypeOptions = new PdfRtfWordFormatOptions();
CrDiskFileDestinationOptions.DiskFileName = @"C:\profiles\Name\Desktop\pdfs\" + line + ".pdf";
ExportOptions expr_71 = this.cryRpt.ExportOptions;                    
expr_71.ExportDestinationType = ExportDestinationType.DiskFile;
expr_71.ExportFormatType = ExportFormatType.PortableDocFormat;
expr_71.DestinationOptions = CrDiskFileDestinationOptions;
expr_71.FormatOptions = CrFormatTypeOptions;
this.cryRpt.Export(); // Here it gives me an error

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...