Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            CrystalReport16 cr   = new CrystalReport16();
            SqlConnection   conn = new SqlConnection();

            conn = DBConnection.getConnection();

            // 9/1/2019
            string appointmentdate = dateTimePicker1.Text;



            conn.Open();
            string sql = "select * from View_11 where appoinment_date ='" + appointmentdate + "'";

            DataSet        ds      = new DataSet();
            SqlDataAdapter adapter = new SqlDataAdapter(sql, conn);

            adapter.Fill(ds, "View_11");
            DataTable dt = ds.Tables["View_11"];

            cr.SetDataSource(ds.Tables["View_11"]);
            crystalReportViewer1.ReportSource = cr;
            crystalReportViewer1.Refresh();
            conn.Close();
        }
Exemple #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrystalReport16 rpt = new CrystalReport16();

            rpt.Site = this.Site;
            return(rpt);
        }