コード例 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptPhieuNhap rpt = new rptPhieuNhap();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
        private void frmBaoCaoPhieuNhap_Load(object sender, EventArgs e)
        {
            SqlConnection  sqlConn = new SqlConnection(@"server = HP-91149BFA9401\SQLEXPRESS;uid = admin;pwd=admin");
            string         sql     = "SELECT *FROM PHIEUNHAP";
            SqlDataAdapter sqlDa   = new SqlDataAdapter(sql, sqlConn);
            DataTable      dt      = new DataTable();

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

            cr.SetDataSource(dt);
            crystalReportViewer1.ReportSource = cr;
        }
コード例 #3
0
        private void frmBaoCaoPhieuNhap_Load(object sender, EventArgs e)
        {
            SqlConnection  sqlConn = new SqlConnection(@"Data Source=DESKTOP-AQEI1KT\SQLEXPRESS;Initial Catalog=khomaytinh;Integrated Security=True");
            string         sql     = "SELECT *FROM PHIEUNHAP";
            SqlDataAdapter sqlDa   = new SqlDataAdapter(sql, sqlConn);
            DataTable      dt      = new DataTable();

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

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