200分求解决,在winform中,用C#+SQL SERVER或ACCESS数据库,VS2003中的水晶报表怎么显示,多表组合查询生成的DataSet呢?请问具体步骤,
string sql="select a.PRDT_INPUT_NO,a.ADDTIME,b.PRDT_CODE,b.QTY,c.PRDT_NAME,c.PRDT_DE,c.PRDT_TYPE,c.PRDT_SPEC,c.PRDT_PRICE,c.PRDT_AV,c.PRDT_UNIT,PRDT_COLOR from PRDT_MF_INPUT a, PRDT_TF_INPUT b, PRDT c where c.PRDT_NAME like '%"+this.txtName.Text.Trim()+"%'";
sql+=" and a.PRDT_INPUT_NO=b.PRDT_INPUT_NO and b.PRDT_CODE=c.PRDT_CODE";
ada=new OleDbDataAdapter(sql,con);
ds=new DataSet();
ada.Fill(ds,"PRDT");
this.dataGrid1.DataBindings.Add("DataSource",ds,"PRDT");
CrystalReport1 crReportDocument = new CrystalReport1();
crReportDocument.SetDataSource(ds.Tables[0]);
crystalReportViewer1.ReportSource = crReportDocument;
就是要把DataSet ds.Tables["PRDT"]这个表,作为水晶报表的数据源,谢谢!
我试了,总会出现数据库登录画面呢?
另100分贴发在图表区
http://community.csdn.net/Expert/topic/4434/4434349.xml?temp=.9661676
请接分