SqlConnection con=new SqlConnection(conStr);
con.Open();
CrystalReport1 rpt=new CrystalReport1();
SqlCommand cmd2=new SqlCommand();
cmd2.Connection=con;
cmd2.CommandText=string.Format("select PONO,pocust,poname,pohard,pocolor,poa,pob,poc,pon,poprice,pototal,pozd3,pofh from power_process where PONO='"+textBox6.Text+"' and rk=2 and printed=0");
SqlDataAdapter da=new SqlDataAdapter();
da.SelectCommand=cmd2;
DataTable dt=new DataTable();
rpt.Close();//关闭rpt 不写这个可能出现异常
da.Fill(dt);
rpt.SetDataSource(dt);
crystalReportViewer1.ReportSource=rpt;
con.Close();
--------------------------------------------------------
水晶报表中 拖上去这么几个列名PONO,pocust,poname,pohard,pocolor,poa,pob,poc,pon,poprice,pototal,pozd3,pofh