Exemple #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crp_bc_pn rpt = new crp_bc_pn();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemple #2
0
        public frm_bc_pn()
        {
            InitializeComponent();
            crp_bc_pn sv      = new crp_bc_pn();
            DateTime  nnhs    = DateTime.Today;
            String    ngaynhs = String.Format("{0:MM/dd/yyyy}", nnhs);
            String    sql     = "Select khachhang.tenkh, maphieu, serisp, tensp, nhanvien.tennv,yeucaukh, ngaynhanhs, ngayhentra, ghichu From phieunhan join nhanvien On phieunhan.manv=nhanvien.manv join khachhang on phieunhan.makh=khachhang.makh where ngaynhanhs='" + ngaynhs + "'";

            if (lib.reDataSet(sql).Tables[0].Rows.Count == 0)
            {
                MessageBox.Show("No data", "Reporting", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            sv.SetDataSource(lib.reDataSet(sql).Tables[0]);
            crystalReportViewer1.ReportSource = sv;
        }