public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { repAlldepotCause rpt = new repAlldepotCause(); rpt.Site = this.Site; return(rpt); }
private void ImprimerAllDept_Cause_Load(object sender, EventArgs e) { repAlldepotCause cr = new repAlldepotCause(); PrintAllDepotCauseDataSet4 ds = new PrintAllDepotCauseDataSet4(); SqlConnection cn = connection.getConnection(); String query1 = "select distinct dp.id_depot,dp.id_cause,cc.nom,ad.nom_adv,dp.num_check,dp.montant from depot_cause dp,adversaire_cause ad,client_cause cc where cc.id_client_cause=dp.id_client_cause and dp.id_adversaire_cause=ad.id_adversaire_cause"; SqlDataAdapter da = new SqlDataAdapter(query1, cn); da.Fill(ds, "Commande"); string query2 = "select top(1) * from avocat"; SqlDataAdapter da2 = new SqlDataAdapter(query2, cn); da2.Fill(ds, "avocat"); cr.SetDataSource(ds); crystalReportViewer1.ReportSource = cr; crystalReportViewer1.Refresh(); }