public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CrystalReportLop rpt = new CrystalReportLop(); rpt.Site = this.Site; return(rpt); }
private void btnHienThi_Click(object sender, EventArgs e) { //string sql = "select * from lop, khoa where Lop.MaKhoa=Khoa.MaKhoa and Lop.MaKhoa='" + cbKhoa.SelectedValue + "'"; string sql = "SELECT * FROM LOP, KHOA WHERE LOP.MaKhoa = KHOA.MaKhoa AND LOP.MaKhoa = '" + cbKhoa.SelectedValue + "'"; CrystalReportLop crtLop = new CrystalReportLop(); UtilityDB data = new UtilityDB(); crtLop.SetDataSource(data.getDataInTable(sql)); rpvLop.ReportSource = crtLop; rpvLop.Refresh(); }