public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { ReportMission rpt = new ReportMission(); rpt.Site = this.Site; return(rpt); }
private void button1_Click(object sender, EventArgs e) { string startDate = dtpStart.Value.ToShortDateString(); Console.WriteLine(startDate); string endDate = dtpEnd.Value.ToShortDateString(); Console.WriteLine(endDate); DataTable dataTable = nhanVienBUS.ListedNumberOfTour(startDate, endDate); ReportMission reportMission = new ReportMission(); reportMission.Database.Tables["ThongKeNhiemVu"].SetDataSource(dataTable); reportMissionViewer.ReportSource = null; reportMissionViewer.ReportSource = reportMission; reportMissionViewer.Refresh(); }