.NET Crystal Report Error : The type or namespace name 'ReportDocument' could not be found (are you missing a using directive or an assembly ref...?)
.NET Crystal Report Error : The type or namespace name 'ReportDocument' could not be found (are you missing a using directive or an assembly ref...?)
我有一个项目,我正在从 Visual Studio 2012 年 Windows 7 移植到 Visual Studio 2017 年 Windows 10。项目构建和 运行 在旧机器上很好。该项目使用 Crystal 报告。
我尝试使用带有 VS 2017 的新机器发布项目时出现多个错误。第一个错误抱怨:CS0246 The type or namespace name 'ReportDocument' could not be found (are you missing a using directive or an assembly reference?) Navi C:\VS\Navi\Picking.aspx.cs 89 Active
文件的第 89 行说:
public ReportDocument rpt
{
get
{
return (ReportDocument)Session["PickHeaderrpt"];
}
set
{
Session["PickHeaderrpt"] = value;
}
}
我有 3 个正在使用,它们是灰色的(未使用??):
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System.Configuration;
我已经从我下载的文件中安装了 Crystal 报告 Visual Studio,版本 13_0_22。好像少了一些参考资料,但我还是很困惑是什么问题?
这里的问题是项目缺少一些 dll。当我将代码从 Windows 7 和 VS 2012 移植到 Windows 10 和 VS 2017 时,新笔记本电脑中缺少安装 libraries/dll 的原始 Crystal 报告。安装最新的 Crystal VS 2017 报告(版本 13_0_22)无法解决缺少 dll 的问题,因为最新的 Crystal 报告中的结构存在差异。
我通过重新安装 VS 2012 和 Crytal Report for VS 2008/2012(ver 13_0_7)解决了这个问题。我幸运地在我的旧硬盘上找到了这个。在新 Windows 10 笔记本电脑上执行 this/reinstalling 旧版本 Crystal 报告清除了与缺少 Crystal 报告 dll 问题相关的所有错误。它甚至允许我 运行 VS 2017 上的项目。
我有一个项目,我正在从 Visual Studio 2012 年 Windows 7 移植到 Visual Studio 2017 年 Windows 10。项目构建和 运行 在旧机器上很好。该项目使用 Crystal 报告。
我尝试使用带有 VS 2017 的新机器发布项目时出现多个错误。第一个错误抱怨:CS0246 The type or namespace name 'ReportDocument' could not be found (are you missing a using directive or an assembly reference?) Navi C:\VS\Navi\Picking.aspx.cs 89 Active
文件的第 89 行说:
public ReportDocument rpt
{
get
{
return (ReportDocument)Session["PickHeaderrpt"];
}
set
{
Session["PickHeaderrpt"] = value;
}
}
我有 3 个正在使用,它们是灰色的(未使用??):
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System.Configuration;
我已经从我下载的文件中安装了 Crystal 报告 Visual Studio,版本 13_0_22。好像少了一些参考资料,但我还是很困惑是什么问题?
这里的问题是项目缺少一些 dll。当我将代码从 Windows 7 和 VS 2012 移植到 Windows 10 和 VS 2017 时,新笔记本电脑中缺少安装 libraries/dll 的原始 Crystal 报告。安装最新的 Crystal VS 2017 报告(版本 13_0_22)无法解决缺少 dll 的问题,因为最新的 Crystal 报告中的结构存在差异。
我通过重新安装 VS 2012 和 Crytal Report for VS 2008/2012(ver 13_0_7)解决了这个问题。我幸运地在我的旧硬盘上找到了这个。在新 Windows 10 笔记本电脑上执行 this/reinstalling 旧版本 Crystal 报告清除了与缺少 Crystal 报告 dll 问题相关的所有错误。它甚至允许我 运行 VS 2017 上的项目。