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

            rpt.Site = this.Site;
            return(rpt);
        }
        private void frmBaoCaoPhieuXuat_Load(object sender, EventArgs e)
        {
            SqlConnection  sqlConn = new SqlConnection(@"Data Source=DESKTOP-AQEI1KT\SQLEXPRESS;Initial Catalog=khomaytinh;Integrated Security=True");
            string         sql     = "SELECT *FROM PHIEUXUAT";
            SqlDataAdapter sqlDa   = new SqlDataAdapter(sql, sqlConn);
            DataTable      dt      = new DataTable();

            sqlDa.Fill(dt);
            rptPhieuXuat cr = new rptPhieuXuat();

            cr.SetDataSource(dt);
            crystalReportViewer1.ReportSource = cr;
        }
Exemple #3
0
        private void frmBaoCaoPhieuXuat_Load(object sender, EventArgs e)
        {
            SqlConnection  sqlConn = new SqlConnection(@"server = HP-91149BFA9401\SQLEXPRESS;uid = admin;pwd=admin");
            string         sql     = "SELECT *FROM PHIEUXUAT";
            SqlDataAdapter sqlDa   = new SqlDataAdapter(sql, sqlConn);
            DataTable      dt      = new DataTable();

            sqlDa.Fill(dt);
            rptPhieuXuat cr = new rptPhieuXuat();

            cr.SetDataSource(dt);
            crystalReportViewer1.ReportSource = cr;
        }