public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CRScanCode rpt = new CRScanCode(); rpt.Site = this.Site; return(rpt); }
public void Bind() { SqlConnection sqlcon = boperate.getcon(); sqlcon.Open(); string sql = "select * from tb_ScanCode where ID='" + Array[0] + "'"; SqlDataAdapter da = new SqlDataAdapter(sql, sqlcon); DataSet1 ds = new DataSet1(); da.Fill(ds, "tb_ScanCode"); CRScanCode oRpt = new CRScanCode(); string ul = "CRScanCode.rpt"; oRpt.Load(ul); oRpt.SetDataSource(ds); crystalReportViewer1.ReportSource = oRpt; }