private void navBarItem4_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
 {
     Reports.XtraReports.rptWare_Congno_Chitiet _rptWare_Congno_Chitiet = new Ecm.Reports.XtraReports.rptWare_Congno_Chitiet();
     this.report = "rptWare_Congno_Chitiet";
     setHesoChuongtrinh(_rptWare_Congno_Chitiet.xrc_CompanyName, _rptWare_Congno_Chitiet.xrc_CompanyAddress, null);
     printControl_Baocao.PrintingSystem = _rptWare_Congno_Chitiet.PrintingSystem;
     _rptWare_Congno_Chitiet.CreateDocument();
 }
        private void Load_rptWare_Congno_Chitiet()
        {
            try
            {
                System.Collections.Hashtable hashtableControls = new System.Collections.Hashtable();
                hashtableControls.Add(dtNgay_Batdau, lblNgay_Batdau.Text);
                hashtableControls.Add(dtNgay_Ketthuc, lblNgay_Ketthuc.Text);
                hashtableControls.Add(lookUpEditMa_Ncc, lblDoituong.Text);

                if (!GoobizFrame.Windows.MdiUtils.Validator.CheckNullFields(hashtableControls))
                {
                    return;
                }

                if (!GoobizFrame.Windows.MdiUtils.Validator.CheckDate(dtNgay_Batdau, dtNgay_Ketthuc))
                {
                    return;
                }

                DataSet ds_Congnothu = objReportService.RptCongno_NCC_Chitiet(dtNgay_Batdau.EditValue, dtNgay_Ketthuc.EditValue, lookUpEditTen_Ncc.EditValue).ToDataSet();
                Ecm.Reports.XtraReports.rptWare_Congno_Chitiet _rptWare_Congno_Chitiet = new Ecm.Reports.XtraReports.rptWare_Congno_Chitiet();
                _rptWare_Congno_Chitiet.DataSource = ds_Congnothu;
                GoobizFrame.Windows.Forms.FrmPrintPreview _FrmPrintPreview = new GoobizFrame.Windows.Forms.FrmPrintPreview();
                _FrmPrintPreview.Report = _rptWare_Congno_Chitiet;
                // Thiết lập hệ số chương trình (Logo, thông tin công ty)
                setHesoChuongtrinh(_rptWare_Congno_Chitiet.xrc_CompanyName, _rptWare_Congno_Chitiet.xrc_CompanyAddress, null);
                _rptWare_Congno_Chitiet.xrDate_From.Text           = dtNgay_Batdau.DateTime.ToString("dd/MM/yyyy");
                _rptWare_Congno_Chitiet.xrDate_To.Text             = dtNgay_Ketthuc.DateTime.ToString("dd/MM/yyyy");
                _rptWare_Congno_Chitiet.xrTableCell_TenKH.Text     = lookUpEditTen_Ncc.Text + " - " + lookUpEditMa_Ncc.Text;
                _rptWare_Congno_Chitiet.xrTableCell_Dienthoai.Text = lookUpEditMa_Ncc.GetColumnValue("Dienthoai").ToString();
                _rptWare_Congno_Chitiet.xrTableCell_Diachi.Text    = lookUpEditMa_Ncc.GetColumnValue("Diachi_Nhacungcap").ToString();
                _rptWare_Congno_Chitiet.xrTableCell_KH.Text        = "Tên NCC";
                _rptWare_Congno_Chitiet.xrTable_Ngay.Text          = DateTime.Today.Day.ToString();
                _rptWare_Congno_Chitiet.xrTable_Thang.Text         = DateTime.Today.Month.ToString();
                _rptWare_Congno_Chitiet.xrTable_Nam.Text           = DateTime.Today.Year.ToString();
                _rptWare_Congno_Chitiet.CreateDocument();
                GoobizFrame.Windows.Forms.ReportOptions oReportOptions = GoobizFrame.Windows.Forms.ReportOptions.GetReportOptions(_rptWare_Congno_Chitiet);
                if (Convert.ToBoolean(oReportOptions.PrintPreview))
                {
                    _FrmPrintPreview.Text = "" + oReportOptions.Caption;
                    _FrmPrintPreview.printControl1.PrintingSystem = _rptWare_Congno_Chitiet.PrintingSystem;
                    _FrmPrintPreview.MdiParent = this.MdiParent;
                    _FrmPrintPreview.Text      = this.Text + "(Xem trang in)";
                    _FrmPrintPreview.Show();
                    _FrmPrintPreview.Activate();
                }
                else
                {
                    var ReportPrintTool = new DevExpress.XtraReports.UI.ReportPrintTool(_rptWare_Congno_Chitiet);
                    ReportPrintTool.Print();
                }
                _FrmPrintPreview.Show();
                _FrmPrintPreview.Activate();
            }
            catch (Exception ex)
            {
#if DEBUG
                MessageBox.Show(ex.Message);
#endif
            }
        }