예제 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rep_depot_plainte rpt = new rep_depot_plainte();

            rpt.Site = this.Site;
            return(rpt);
        }
        private void Imprimer_Depot_Plainte_Load(object sender, EventArgs e)
        {
            rep_depot_plainte           cr = new rep_depot_plainte();
            SqlConnection               cn = connection.getConnection();
            PrintAllDepotPlaintDataSet4 ds = new PrintAllDepotPlaintDataSet4();
            String         query1          = "select dc.id_depot,dc.id_plainte,cc.nom,ad.nom as[nom_adv],dc.num_check,dc.montant from depot_plgn dc,plaignant cc,par_plaignant ad where dc.id_depot like '" + id + "' and dc.id_par_plaignant=ad.id_par_plaignant and dc.id_plaignant=cc.id_plaignant";
            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();
        }