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

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #2
0
 public void rapport()
 {
     try
     {
         Rapport cr = new Rapport();
         dao.InitialiserConnexion();
         if (!dao.conn.State.ToString().ToLower().Equals("open"))
         {
             dao.conn.Open();
         }
         string rqt = "Select * from Rapport_appro";
         dao.daset = new DataSet();
         dao.dp    = new SqlDataAdapter(rqt, dao.conn);
         dao.dp.Fill(dao.daset, "Rapport_appro");
         cr.SetDataSource(dao.daset.Tables["Rapport_appro"]);
         ViewRepport.ReportSource = cr;
     }
     catch (Exception ex) { MessageBox.Show(ex.Message); }
 }
예제 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            string date  = date1.Value.ToString("yyyy/MM/dd");
            string dates = date2.Value.ToString("yyyy/MM/dd");

            try
            {
                Rapport cr = new Rapport();
                dao.InitialiserConnexion();
                if (!dao.conn.State.ToString().ToLower().Equals("open"))
                {
                    dao.conn.Open();
                }
                string rqt = "SELECT * FROM ListeAppro WHERE Date_Appro BETWEEN CONVERT(varchar(10), '" + date + "', 103) AND CONVERT(varchar(10), '" + dates + "', 103) ";
                dao.daset = new DataSet();
                dao.dp    = new SqlDataAdapter(rqt, dao.conn);
                dao.dp.Fill(dao.daset, "Rapport_appro");
                cr.SetDataSource(dao.daset.Tables["Rapport_appro"]);
                //ViewRepport.ReportSource = cr;
            }
            catch (Exception ex) { MessageBox.Show(ex.Message); }
        }