CrystalReport数据绑定问题 急啊
string connstr = "Data Source=localhost;Initial Catalog=flatdata;User ID=sa;Password=123;";conn = new SqlConnection(connstr);
conn.Open();
SqlCommand mycommand = new SqlCommand("select * from student", conn);
SqlDataAdapter MyAdapter = new SqlDataAdapter();
MyAdapter.SelectCommand = mycommand;
DataSet mydataset = new DataSet();
MyAdapter.Fill(mydataset,"pp");
CrystalReport1 rp = new CrystalReport1();
rp.SetDataSource(mydataset);
crystalReportViewer1.ReportSource = rp;
我添加的是一个空的CrystalReport报表
数据集没有错
可是运行的时候总是出现如下问题