至于如何建立RDLC的过程 详情:http://www.cnblogs.com/wjhx/archive/2007/06/12/379604.htm
http://www.cnblogs.com/wjhx/archive/2006/04/21/381644.html
后台:
DataSet thisDataSet = new DataSet(); this.ReportViewer1.LocalReport.ReportEmbeddedResource = "..//Reports//SendGoods.rdlc"; SqlParameter[] parms = new SqlParameter[2]; parms[0] = new SqlParameter("@StartDate", SqlDbType.NVarChar, 8); parms[1] = new SqlParameter("@EndDate", SqlDbType.NVarChar, 8); parms[0].Value = d1; parms[1].Value =d2; DABaseAccess db = new DABaseAccess("ZM"); thisDataSet = db.RunprocToDataSet("UP_SendGoods", parms); ReportDataSource datasource = new ReportDataSource("myds", thisDataSet.Tables[0]); ReportViewer1.LocalReport.DataSources.Clear(); ReportViewer1.LocalReport.DataSources.Add(datasource); if (thisDataSet.Tables[0].Rows.Count == 0) { JScript.Alert("Sorry, no products under this category!", this.Page); } ReportViewer1.LocalReport.Refresh();l