c# - ReportDocument 类失败
问题描述
我目前在我的应用程序中使用 ReportDocument 类时遇到问题。如果您能帮助我找出解决方案,我将不胜感激;这是我的代码:
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System;
using System.Windows.Forms;
using CrystalDecisions.ReportAppServer.ClientDoc;
namespace CrystalReportApp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
ReportDocument rptDoc = new ReportDocument();
rptDoc.Load(@"C:\Lading.rpt");
MessageBox.Show(rptDoc.FileName);
}
}
}
每次运行代码时发生的异常是:System.IO.FileNotFoundException:'无法加载文件或程序集'CrystalDecisions.ReportAppServer.ClientDoc,版本 = 11.0.3300.0,文化 = 中性,PublicKeyToken = 692fbea5521e1304'或其之一依赖关系。该系统找不到指定的文件。'
解决方案
您是否在计算机上安装了“SAP Crystal Reports Runtime For .NET 4.0”32 位?
推荐阅读
- docker - Golang os.Getenv(key) 返回整个 env 文件,而不仅仅是键的值
- python-3.x - 全局变量(尽管已定义)错误未在 python 中定义
- microsoft-edge - WebView2 运行时的离线安装程序/固定版本安装程序
- android - 更改移动语言时损坏的 XML 布局
- laravel - 如何将变量从服务器传递到 app.js?Laravel + Vue
- php - 如何将多个图像发送到 REST API
- python - Flask 日志记录处理程序信息
- javascript - slack botkit - 特定斜杠命令上的“听到”不起作用
- javascript - Ember 仅在初始渲染时调用 jQuery 代码
- r - R:从列表中查找所有元素并将结果写入另一个列表