string reportPath; reportPath = Request.PhysicalApplicationPath + "CrystalReport.rpt";//web 中指定报表路径 ReportDocument ReportDoc = new ReportDocument(); ReportDoc.Load(reportPath);//加载报表对象 ReportDoc.SetDataSource(DbHelperSQL.Query("Select * From test where 1=1").Tables[0]);//指定数据源 this.CrystalReportViewer1.ReportSource = ReportDoc;