返回首页

我得到下面的错误在Crystal Reports

Error	1	The type or namespace name 'myreport' could not be found (are you missing a using directive or an assembly reference?)	F:\myaspcrystal\Default.aspx.cs	49	9	F:\myaspcrystal\


{C}
using System;

using System.Configuration;

using System.Data;

using System.Linq;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.HtmlControls;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Xml.Linq;

using System.Data.SqlClient;

using System.IO;

using System.Collections.Generic;

using CrystalDecisions.CrystalReports.Engine;

using CrystalDecisions.Shared;

{体C3}
任何一个可以帮助我弄清楚

回答

评论会员:游客 时间:2012/02/06
|Murugan_vdm:错误1:检查您的CrystalReportViewer无论是"crystalReportViewer1"或别的名称: 在你的代码是无级名为"myreport"。请使用操纵水晶报表的ReportDocument类。错误2:您没有在您的设计视图中添加CrystalReportViewer控制。 添加的CrystalReportViewer,{​​BR}转到工具箱-GT;报告制表GT的CrystalReportViewer
indrish
评论会员:游客 时间:2012/02/06
嘿,替换此"myreport举报=,新myreport();'ReportDocument的报告=新的ReportDocument()然后分配这个'报告'对象crystalReportViewer1如下:-r不使用报表查看器的类名绑定的报告crystalReportViewer1.ReportSource"=crystalReport确保;|Tanaya17:您的第一个错误行取代ReportDocument的crystalReport=新的ReportDocument()更换你的第二个错误行CrystalReportViewer1.ReportSource=crystalReport;