出现加载报告失败错误 [英] Load Report Failed Error Appears

查看:89
本文介绍了出现加载报告失败错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

受保护的无效Button5_Click(对象发送者,EventArgs e)
{
con = new SqlConnection("Server =(local); initial catalog = master; Trusted_Connection = True");
con.Open();
字符串str =从Empdet中选择*,其中EmployeeID ="" + DropDownList1.SelectedValue +''";
SqlCommand com =新的SqlCommand(str,con);
SqlDataAdapter sqlda =新的SqlDataAdapter(com);
DataSet ds = new DataSet();
sqlda.Fill(ds,"Empdet");
con.Close();

ReportDocument r1 =新的ReportDocument();
字符串路径= Server.MapPath("Reports/Employee.rpt");
r1.Load(path);
r1.SetDataSource(ds);
CrystalReportViewer1.ReportSource = r1;
CrystalReportViewer1.RefreshReport();

文本框按钮.

在文本框中,当我输入partiuclar员工ID并单击按钮时,错误如下
加载报告失败.请帮助我并发送代码.

protected void Button5_Click(object sender, EventArgs e)
{
con = new SqlConnection("Server=(local);initial catalog=master;Trusted_Connection=True");
con.Open();
string str = "select * from Empdet where EmployeeID=''" + DropDownList1.SelectedValue + "''";
SqlCommand com = new SqlCommand(str, con);
SqlDataAdapter sqlda = new SqlDataAdapter(com);
DataSet ds = new DataSet();
sqlda.Fill(ds, "Empdet");
con.Close();

ReportDocument r1 = new ReportDocument();
string path = Server.MapPath("Reports/Employee.rpt");
r1.Load(path);
r1.SetDataSource(ds);
CrystalReportViewer1.ReportSource = r1;
CrystalReportViewer1.RefreshReport();

Textbox Button.

In textbox when i type partiuclar employee id and click the button,Error As follows
Load Report failed.please help me and send the code.

推荐答案

选中此选项:-
Crystal Reports:修复了"Load report failed"错误. [ ^ ]
check this one :-
Crystal Reports: Fix for "Load report failed" error.[^]


这篇关于出现加载报告失败错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆