public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrystalReport5 rpt = new CrystalReport5();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        private void btnXem_Click(object sender, EventArgs e)
        {
            String a = MaPhong(comboBox1.Text);

            cnn.Open();
            String         sql = "select * from v_NhanVien where MaP = '" + a + "'";
            SqlCommand     cmd = new SqlCommand(sql, cnn);
            SqlDataAdapter da  = new SqlDataAdapter(cmd);
            DataTable      dt  = new DataTable();

            da.Fill(dt);
            CrystalReport5 rp = new CrystalReport5();

            //crystalReportViewer1.C;
            rp.SetDataSource(dt);
            crystalReportViewer1.ReportSource = rp;
            cnn.Close();
        }