Ejemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            allCauseArchive rpt = new allCauseArchive();

            rpt.Site = this.Site;
            return(rpt);
        }
        private void imprimerAllCauseArchive_Load(object sender, EventArgs e)
        {
            if (cn.State == ConnectionState.Closed)
            {
                cn.Open();
            }
            cmd = new SqlCommand("select c.id_cause,cl.nom ,ad.nom_adv,c.num_cause_tribunal ,c.type_cause ,c.ville,c.tribunal  from cause c,client_cause cl,adversaire_cause ad where( c.id_cause like '%" + id + "%' and c.etat='archivé'  and c.id_client=cl.id_client_cause and c.id_adv=ad.id_adversaire_cause) or ( c.num_cause_tribunal like '%" + id + "%' and  c.etat='archivé'  and c.id_client=cl.id_client_cause and c.id_adv=ad.id_adversaire_cause) or ( cl.nom like '%" + id + "%' and c.etat='archivé'  and  c.id_client=cl.id_client_cause and c.id_adv=ad.id_adversaire_cause) or ( cl.cin like '%" + id + "%' and c.etat='archivé'  and  c.id_client=cl.id_client_cause and c.id_adv=ad.id_adversaire_cause)order by date_session ASC", cn);
            da  = new SqlDataAdapter(cmd);
            da.Fill(ds, "cause");
            cmd1 = new SqlCommand("select top(1)*from avocat", cn);
            da1  = new SqlDataAdapter(cmd1);
            da1.Fill(ds, "avocat");
            allCauseArchive i = new allCauseArchive();

            i.SetDataSource(ds);
            crystalReportViewer1.ReportSource = i;
            cn.Close();
        }