SqlParameter[] parms = { new SqlParameter("@CompID",System.Data.SqlDbType.BigInt),
new SqlParameter("@StartTime",System.Data.SqlDbType.DateTime),
new SqlParameter("@EndTime",System.Data.SqlDbType.DateTime)
};
parms[0].Value = 100001000000000000;
parms[1].Value = Convert.ToDateTime("2010-01-01");
parms[2].Value = Convert.ToDateTime("2010-09-01");
DataSet ds = MsSqlHelper.RunProcedure(RptCom.ConnString, "Report_Wyy_CustBillOnCom", (IDataParameter[])parms, "CustBill", "命令");
//Crs CrystalReportSource
//Crv CrystalReportViewer
Crs.ReportDocument.Load(Server.MapPath("RptFile/Rpt_CustomBill.rpt"));
Crs.ReportDocument.SetDataSource(ds);
Crs.ReportDocument.SetParameterValue("StartTime", "2010-01-01");
Crs.ReportDocument.SetParameterValue("EndTime", "2010-09-01");
Crs.ReportDocument.SetParameterValue("Printer", "打印人");
Crs.DataBind();
Crv.ReportSource = Crs;
Crv.DataBind();