vs2010制作水晶报表出现加载数据库信息失败,哪位高手能给解答一下!谢谢了!
1个回答
展开全部
InitializeComponent();
//Console.Write(s);
string constr = "Data Source=192.168.0.85;Initial Catalog=CMBARCODE;Persist Security Info=True;User ID=dbname;Password=access";
DataOpt daa = new DataOpt();
SqlConnection conn = new SqlConnection(constr);
DataSet1 mydata = new DataSet1();
string sqlstr = "select JobNum,RequireDate,PartNum,PartDescription,RequireQty,IssuedQty, purcomment,warehousecode,pickper,sendper from material_dan where JobNum ='" + s + "'";
SqlDataAdapter myadapter = new SqlDataAdapter(sqlstr, conn);
myadapter.Fill(mydata, "material_dan");
CrystalReport3 cr = new CrystalReport3();
cr.SetDataSource(mydata);
crystalReportViewer1.ReportSource = cr;
}
我做的水晶报表,给你参考下
//Console.Write(s);
string constr = "Data Source=192.168.0.85;Initial Catalog=CMBARCODE;Persist Security Info=True;User ID=dbname;Password=access";
DataOpt daa = new DataOpt();
SqlConnection conn = new SqlConnection(constr);
DataSet1 mydata = new DataSet1();
string sqlstr = "select JobNum,RequireDate,PartNum,PartDescription,RequireQty,IssuedQty, purcomment,warehousecode,pickper,sendper from material_dan where JobNum ='" + s + "'";
SqlDataAdapter myadapter = new SqlDataAdapter(sqlstr, conn);
myadapter.Fill(mydata, "material_dan");
CrystalReport3 cr = new CrystalReport3();
cr.SetDataSource(mydata);
crystalReportViewer1.ReportSource = cr;
}
我做的水晶报表,给你参考下
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询