private void btn_XuatEx_Click(object sender, EventArgs e)
        {
            string          query = "SELECT * From LoaiSanPham  ";
            CRp_LoaiSanPham sp    = new CRp_LoaiSanPham();

            sp.SetDataSource(Dataset.DaTa.report(query));
            fRPTsp f = new fRPTsp();

            f.crystalReportViewer1.ReportSource = sp;
            f.ShowDialog();
        }
Пример #2
0
        private void btn_XuatEx_Click(object sender, EventArgs e)
        {
            string query = "SELECT SanPham.TenSanPham,LoaiSanPham.TenLoai,CTSanPham.KichCo,CTSanPham.MaSac,CTSanPham.ChatLieu,CTSanPham.GiaBan,CTSanPham.SoLuong  FROM SanPham, LoaiSanPham, CTSanPham " +
                           "WHERE SanPham.MaLoai = LoaiSanPham.MaLoai and SanPham.MaSp = CTSanPham.MaSp and SanPham.TinhTrang = '1' and CTSanPham.TinhTrang = '1' " +
                           "GROUP BY SanPham.TenSanPham,LoaiSanPham.TenLoai,CTSanPham.KichCo,CTSanPham.MaSac,CTSanPham.ChatLieu,CTSanPham.GiaBan,CTSanPham.SoLuong";

            CRp_SanPham sp = new CRp_SanPham();

            sp.SetDataSource(Dataset.DaTa.report(query));
            fRPTsp f = new fRPTsp();

            f.crystalReportViewer1.ReportSource = sp;
            f.ShowDialog();
        }