c# - 无法使用 SAP Crystal Report 生成报告

标签 c# wpf visual-studio-2010 crystal-reports

我在 WPF 应用程序中使用 Crystal 报表为我的订单生成报表时遇到了一个问题。

我的工作站配置是 Windows 7(旗舰版)64 位、Visual Studio 2010。

我没有安装任何 Crystal Report 引擎,但我已将所有必要的 dll 复制到我的项目中(创建一个文件夹,然后在我的项目中引用)。

但是当我单击按钮(生成报告的按钮)时,我在报告构造函数中遇到异常(不同的运行会出现不同的异常)。

主要异常说

"The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception."

当我深入研究内部异常时,我了解到这一点。

"Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.":"CrystalDecisions.ReportAppServer.CommLayer, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"

这是我错误的截图,

我在谷歌上搜索了一下,知道我需要为 Vstudio 2010 安装 CR,但是如果我安装我的开发机器,我怎样才能让安装程序部署在客户端机器上,我不想安装 CR在所有机器中(我要部署到我的许多客户的机器上)。

我真的需要帮助来解决这个问题,我该怎么做才能解决我的问题?

非常感谢任何帮助。

最佳答案

官方文档says :

Deploying Crystal Reports for Visual Studio 2010 (CRVS2010) runtime files is mandatory in order to ensure that a project containing Crystal Reports components functions correctly.

要么遵循这些建议,要么拒绝在您的应用程序中使用 Crystal Reports 并选择其他部署符合您要求的报告引擎。

关于c# - 无法使用 SAP Crystal Report 生成报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26174770/

相关文章:

C# 计时器 Azure SQL 函数

c# - Bgr32 PixelFormat 中的第四个 channel 是什么

c# - 设置报告查看器参数

c# - 为什么资源文件中的标签大小会发生变化?

c# - 使用整数指针从 C# 调用外部 DLL

c# - FindNode 方法 TreeView 值中带有正斜杠

c# - 具有排名和唯一用户的高分

.net - 如何在WPF中制作模式对话框?

c# - WPF是否有鼠标滚轮上下滚动事件

visual-studio-2010 - 将错误与boost,VS2010和CMake链接