public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { ListOperationCrystalReport rpt = new ListOperationCrystalReport(); rpt.Site = this.Site; return(rpt); }
private void Imprimer_Click(object sender, EventArgs e) { DataSet dataSet = new DataSet(); new SqlDataAdapter($"select * from ligneMedecinOperation where dateOperation between" + $" '{FirstDate.Text}' and '{LastDate.Text}'", new SqlConnection(Global.connectionString)) .Fill(dataSet, "ligneOperation"); ListOperationCrystalReport report = new ListOperationCrystalReport(); report.SetDataSource(dataSet.Tables[0]); report.SetParameterValue("FirstDate", FirstDate.Text); report.SetParameterValue("LastDate", LastDate.Text); crystalReportViewer1.ReportSource = report; }