Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rpSach rpt = new rpSach();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        private void frmDSSach_Load(object sender, EventArgs e)
        {
            string         query     = "SELECT dbo.SACH.MaSach, dbo.SACH.TenSach, dbo.SACH.TheLoai, dbo.SACH.TacGia, dbo.SACH.NXB, dbo.NHACUNGCAP.TenNCC, dbo.SACH.SLTon, dbo.SACH.Hinh FROM dbo.NHACUNGCAP INNER JOIN dbo.SACH ON dbo.NHACUNGCAP.MaNCC = dbo.SACH.MaNCC";
            DataTable      tblDSSach = new DataTable();
            SqlDataAdapter da        = new SqlDataAdapter(query, XLBang.cnnStr);

            try
            {
                da.Fill(tblDSSach);
                rpSach rpt = new rpSach();
                rpt.SetDataSource(tblDSSach);
                rptvDSSach.ReportSource = rpt;
            }
            catch (SqlException ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }