public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { report_barang rpt = new report_barang(); rpt.Site = this.Site; return(rpt); }
//5. void cetak void cetak() { SqlConnection conn = konn.GetConn(); { conn.Open(); da = new SqlDataAdapter("select * from tbl_barang order by KodeBarang asc", conn); ds = new DataSet(); da.Fill(ds, "tbl_barang"); report_barang myreport = new report_barang(); myreport.SetDataSource(ds); crystalReportViewer1.ReportSource = myreport; crystalReportViewer1.Refresh(); } }