我装的是CR9,使用vs 2003.
在源文件里已经添加了:using CrystalDecisions.CrystalReports.Engine ;这一句.
生成时出现:找不到类型或命名空间名称(ReportDocument)(是否缺少using指令或程序集引用?)
行33
33行内容:ReportDocument oRpt = new ReportDocument();请问各位大哥,为什么会出现这样的错误?
在源文件里已经添加了:using CrystalDecisions.CrystalReports.Engine ;这一句.
生成时出现:找不到类型或命名空间名称(ReportDocument)(是否缺少using指令或程序集引用?)
行33
33行内容:ReportDocument oRpt = new ReportDocument();请问各位大哥,为什么会出现这样的错误?
不会跟这有关系吧?
可是我在浏览器打开rpview1.aspx时出现另一个错误:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Line 44:
Line 45: //建立.rpt文件与CryStalReportviewer文件之间的连接
Line 46: CrystalReportViewer1.ReportSource=oRpt;
Line 47: }
Line 48:
[AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.]
CrystalDecisions.Web.ReportAgent.h() +317
CrystalDecisions.Web.ReportAgentBase.set_ReportSource(Object value) +229
CrystalDecisions.Web.ReportAgent.set_ReportSource(Object value) +14
CrystalDecisions.Web.CrystalReportViewerBase.set_ReportSource(Object value) +36
csharpj.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\csharpj\rpview1.aspx.cs:46
System.Web.UI.Control.OnLoad(EventArgs e) +102
System.Web.UI.Control.LoadRecursive() +47
System
Line 44: override public void OnInit(EventArgs e)
Line 45: {
Line 46: //
Line 47: // CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
Line 48: //
Source File: c:\inetpub\wwwroot\csharpj\rpview1.aspx.cs Line: 46 Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
CrystalDecisions.Web.ReportAgent.h() +317
CrystalDecisions.Web.ReportAgentBase.set_ReportSource(Object value) +229
CrystalDecisions.Web.ReportAgent.set_ReportSource(Object value) +14
CrystalDecisions.Web.CrystalReportViewerBase.set_ReportSource(Object value) +36
csharpj.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\csharpj\rpview1.aspx.cs:46
System.Web.UI.Control.OnLoad(EventArgs e) +102
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1064