本文介绍了Crystal报告显示C#framework 4.5,visual studio 2012中没有数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 以下是我的C#代码, Here is my C# code,protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { try { ReportDocument crystalReport = new ReportDocument(); crystalReport.Load(Server.MapPath("~\\CrystalReport.rpt")); DataTable dt = new DataTable(); dt = GetData(); crystalReport.SetDataSource(dt); //error occurs on this line CrystalReportViewer1.ReportSource = crystalReport; CrystalReportViewer1.DataBind(); } catch (Exception ex) { Response.Write(ex); } } } private DataTable GetData() { string constr = ConfigurationManager.ConnectionStrings["DBCarUAE"].ConnectionString; using (SqlConnection con = new SqlConnection(constr)) { using (SqlCommand cmd = new SqlCommand("SELECT F_Name, L_Name,E_Mail from VendorRegistration")) { using (SqlDataAdapter sda = new SqlDataAdapter()) { cmd.Connection = con; sda.SelectCommand = cmd; cmd.CommandTimeout = 0; using (DataTable dsCustomers = new DataTable()) { sda.Fill(dsCustomers); return dsCustomers; } } } } } 当我运行此代码时,调试器显示错误: 功能评估已禁用,因为之前的功能评估已超时。您必须继续执行以重新启用功能评估。 请帮我解决这个问题。 提前致谢。When i run this code, debugger shows error : "Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation."Please help me to get over this.Thanks in advance.推荐答案 这篇关于Crystal报告显示C#framework 4.5,visual studio 2012中没有数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-10 03:30