public void cetak() { cetak ds = getData(); ReportDataSource dataSource = new ReportDataSource("DataSet1", ds.Tables[0]); this.dgvCetak.LocalReport.DataSources.Clear(); this.dgvCetak.LocalReport.DataSources.Add(dataSource); this.dgvCetak.RefreshReport(); }
public cetak getData() { cn.Open(); cm = new SqlCommand("select * from vw_cetak where notrx='" + notrxText + "' ", cn); da = new SqlDataAdapter(cm); cetak ds = new cetak(); da.Fill(ds, "vw_cetak"); return(ds); }