public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { ReportDriver rpt = new ReportDriver(); rpt.Site = this.Site; return(rpt); }
private void crystalReportViewer1_Load(object sender, EventArgs e) { SqlConnection conn = connect.Getconect(); conn.Open(); string sql = "select * from tblDrivers"; SqlDataAdapter sda = new SqlDataAdapter(sql, conn); Driver ds = new Driver(); sda.Fill(ds, "TblDrivers"); ReportDriver rpd = new ReportDriver(); rpd.SetDataSource(ds); crystalReportViewer1.ReportSource = rpd; crystalReportViewer1.Show(); }