Example #1
0
 private void tsslexcel_Click(object sender, EventArgs e)
 {
     try
     {
         if (i < 0)
         {
             return;
         }
         disable();
         saveFileDialog1.Filter = "Excel |*.xls"; saveFileDialog1.FileName = "";
         if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             string manhomhang = dtgvhienthi["MaNhomHang", i].Value.ToString();
             Report.rptXuatNhapHangTheoNhomHang report = new Report.rptXuatNhapHangTheoNhomHang();
             report.SetDataSource(ChiTietNhom(manhomhang));
             report.SetParameterValue("Ky", thang.ToString() + "-" + nam.ToString());
             report.SetParameterValue("TenBaoCao", "Báo Cáo Xuất Nhập Tồn Theo Nhóm Hàng");
             frmBaoCaorpt a = new frmBaoCaorpt(report, saveFileDialog1.FileName, Report.ExportCrystalReport.TypeBC.Excel);
             a.Dispose();
         }
     }
     catch
     {
     }
     finally
     {
         enable();
     }
 }
Example #2
0
 private void tsslchitiet_Click(object sender, EventArgs e)
 {
     if (i < 0)
     {
         return;
     }
     try
     {
         disable();
         string manhomhang = dtgvhienthi["MaNhomHang", i].Value.ToString();
         Report.rptXuatNhapHangTheoNhomHang report = new Report.rptXuatNhapHangTheoNhomHang();
         report.SetDataSource(ChiTietNhom(manhomhang));
         report.SetParameterValue("Ky", thang.ToString() + "-" + nam.ToString());
         report.SetParameterValue("TenBaoCao", "Báo Cáo Xuất Nhập Tồn Theo Nhóm Hàng");
         frmBaoCaorpt a = new frmBaoCaorpt(report);
         a.ShowDialog();
     }
     catch
     {
     }
     finally
     {
         enable();
     }
 }
 private void tsslWord_Click(object sender, EventArgs e)
 {
     try
     {
         if (i < 0)
             return;
         disable();
         saveFileDialog1.Filter = "Word |*.doc"; saveFileDialog1.FileName = "";
         if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             string manhomhang = dtgvhienthi["MaNhomHang", i].Value.ToString();
             Report.rptXuatNhapHangTheoNhomHang report = new Report.rptXuatNhapHangTheoNhomHang();
             report.SetDataSource(ChiTietNhom(manhomhang));
             report.SetParameterValue("Ky", thang.ToString() + "-" + nam.ToString());
             report.SetParameterValue("TenBaoCao", "Báo Cáo Xuất Nhập Tồn Theo Nhóm Hàng");
             frmBaoCaorpt a = new frmBaoCaorpt(report, saveFileDialog1.FileName, Report.ExportCrystalReport.TypeBC.WordForWindows);
             a.Dispose();
         }
     }
     catch
     {
     }
     finally
     {
         enable();
     }
 }
 private void tsslchitiet_Click(object sender, EventArgs e)
 {
     if (i < 0)
         return;
     try
     {
         disable();
         string manhomhang = dtgvhienthi["MaNhomHang", i].Value.ToString();
         Report.rptXuatNhapHangTheoNhomHang report = new Report.rptXuatNhapHangTheoNhomHang();
         report.SetDataSource(ChiTietNhom(manhomhang));
         report.SetParameterValue("Ky", thang.ToString() + "-" + nam.ToString());
         report.SetParameterValue("TenBaoCao", "Báo Cáo Xuất Nhập Tồn Theo Nhóm Hàng");
         frmBaoCaorpt a = new frmBaoCaorpt(report);
         a.ShowDialog();
     }
     catch
     {
     }
     finally
     {
         enable();
     }
 }