示例#1
0
        public void Execute()
        {
            try
            {
                if(Prizm.Main.Common.DateExtension.CheckDiapason(viewModel.WeldDateFrom, viewModel.WeldDateTo))
                {
                    viewModel.Data = repo.GetPipelineElements(viewModel.WeldDateFrom, viewModel.WeldDateTo);
                    if(viewModel.Data == null || viewModel.Data.Rows.Count <= 0)
                        log.Warn("Construction report: Data Table for Weld by Date report is NULL or empty");

                    var report = new WeldDateXtraReport();

                    report.DataSource = viewModel.WeldDateReportDataList;
                    report.FootersVisibility = viewModel.IsFooterVisible;
                    var tool = new ReportPrintTool(report);
                    tool.AutoShowParametersPanel = false;
                    tool.ShowPreview();

                    RefreshVisualStateEvent();
                }
                else
                {
                    notify.ShowInfo(Program.LanguageManager.GetString(StringResources.Message_FailureReportDate),
                        Program.LanguageManager.GetString(StringResources.Message_FailureReportDateHeader));
                    log.Warn("Date limits not valid!" + "Diapason: start date= "
                        + viewModel.WeldDateFrom.ToString() + " end date= " + viewModel.WeldDateTo.ToString());
                }
            }
            catch(RepositoryException ex)
            {
                log.Warn(this.GetType().Name + " | " + ex.ToString());
                notify.ShowWarning(Program.LanguageManager.GetString(StringResources.Notification_Error_Db_Message),
            Program.LanguageManager.GetString(StringResources.Notification_Error_Db_Header));
            }
        }
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            BaoCaoBangHang bc = new BaoCaoBangHang();
            DataTable dt = gcKetQua.DataSource as DataTable;
            if (dt != null && dt.Rows.Count > 0)
            {
                bc.Data = gcKetQua.DataSource as DataTable;
                bc.MaNhanVien = this.teMaNhanVien.Text;
                bc.TenNhanVien = this.teNhanVien.Text;
                bc.TuNgay = this.dateTuNgay.Text;
                bc.DenNgay = this.dateDienNgay.Text;

                XRLapBaoCaoBanHang BCTonKho = new XRLapBaoCaoBanHang(bc);
                try
                {
                    BCTonKho.CreateDocument();
                }
                catch (Exception ex)
                {

                }
                ReportPrintTool printTool = new ReportPrintTool(BCTonKho);
                printTool.ShowPreviewDialog();
            }
            else
            {
                MessageBox.Show("Danh Sách Báo Cáo Trống",
                   "Thông Báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            }
        }
 public void Print()
 {
     using (ReportPrintTool printTool = new ReportPrintTool(DocumentSource as XtraReport))
     {
         printTool.Print();
     }
 }
        public void Execute()
        {
            try
            {
                viewModel.Data = repo.GetPipelineElements(
                    viewModel.PipeNumber,
                    viewModel.CheckedPipeTypes.Select<PipeMillSizeType, string>(x => x.Type).ToArray<string>());

                if(viewModel.Data == null || viewModel.Data.Rows.Count <= 0)
                    log.Warn(string.Format("Data Table for Pipe Report (pipe #{0}) report is NULL or empty", viewModel.PipeNumber));

                var report = new PipeConstructionXtraReport();

                report.DataSource = viewModel.PipeReportDataList;
                report.FootersVisibility = viewModel.IsFooterVisible;
                var tool = new ReportPrintTool(report);
                tool.AutoShowParametersPanel = false;
                tool.ShowPreview();

                RefreshVisualStateEvent();
            }
            catch(RepositoryException ex)
            {
                log.Warn(this.GetType().Name + " | " + ex.ToString());
                notify.ShowWarning(Program.LanguageManager.GetString(StringResources.Notification_Error_Db_Message),
            Program.LanguageManager.GetString(StringResources.Notification_Error_Db_Header));
            }
        }
        private void btnPrintByCustomer_Click(object sender, EventArgs e)
        {
            CustomersBO aCustomersBO = new CustomersBO();
            Customers aCustomer = new Customers();
            aCustomer = aCustomersBO.Select_ByID(int.Parse(loeListCustomer.EditValue.ToString()));
            this.aNewPaymentEN = this.aNewPaymentEN.SlipPaymentByCustomer(aCustomer);

            try
            {
                if (this.aNewPaymentEN.Status_BookingR == 8 || this.aNewPaymentEN.Status_BookingR == 7)
                {

                    frmRpt_Payment_BookingRs afrmRpt_Payment_BookingRs = new frmRpt_Payment_BookingRs(this.aNewPaymentEN);
                    ReportPrintTool tool = new ReportPrintTool(afrmRpt_Payment_BookingRs);
                    tool.ShowPreview();
                }
                else
                {
                    frmRpt_Payment_BookingRsUnPay afrmRpt_Payment_BookingRs = new frmRpt_Payment_BookingRsUnPay(this.aNewPaymentEN);
                    ReportPrintTool tool = new ReportPrintTool(afrmRpt_Payment_BookingRs);
                    tool.ShowPreview();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("frmTsk_ChoosePrintType.btnPrint_Click\n" + ex.ToString(), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void sbChiTietBaoCao_Click(object sender, EventArgs e)
        {
            BaoCaoNhapHang bc = new BaoCaoNhapHang();

            DataTable dt = gcChiTietBaoCao.DataSource as DataTable;
            if (dt != null && dt.Rows.Count > 0)
            {
                bc.ChiTietBaoCao = gcChiTietBaoCao.DataSource as DataTable;
                bc.ThoiGian = ((DateTime)deThoiGian.EditValue).ToString("MM/dd/yyyy");
                XRBaoCaoNhapHang BCTonKho = new XRBaoCaoNhapHang(bc);
                try
                {
                    BCTonKho.CreateDocument();
                }
                catch (Exception ex)
                {

                }
                ReportPrintTool printTool = new ReportPrintTool(BCTonKho);
                printTool.ShowPreviewDialog();
            }
            else
            {
                MessageBox.Show("Danh Sách Báo Cáo Trống",
                   "Thông Báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            }
        }
示例#7
0
 private void btnPrint_Click(object sender, EventArgs e)
 {
     ReportPrintTool pt = new ReportPrintTool(billReportView);
     pt.PrintingSystem.StartPrint +=
         new PrintDocumentEventHandler(printingSystem_StartPrint);
     pt.PrintDialog();
 }
示例#8
0
 private void barkodYazdir()
 {
     int x = 1;
     etiketler.Clear();
     foreach (string item in listboxLabel.Items)
     {
         Etiket s = new Etiket();
         s.ID = x;
         s.Barkod = item;
         etiketler.Add(s);
         x++;
     }
     if (MessageBox.Show(string.Format("{0} adet barkod bulundu. Yazdırılacak emin misiniz ?", etiketler.Count), "Yazdırma", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
     {
         rptBarkod Rapor = new rptBarkod();
         Rapor.DataSource = etiketler;
         Rapor.PageWidth = (int)spWidth.Value;
         Rapor.PageHeight = (int)spHeight.Value;
         ReportPrintTool reportPrintTool = new ReportPrintTool(Rapor);
         reportPrintTool.ShowPreviewDialog();
     }
     else
     {
         return;
     }
 }
示例#9
0
        public frmPrintBarcode(frmPrintBarcode _barcode) {
            try 
            {
                InitializeComponent();
                splashScreenManager1.ShowWaitForm();
                this.pBarocde = _barcode;
                sBundleTicket report = new sBundleTicket();
                rptBarcodeList s = new rptBarcodeList();
                OprationBarcodeList list = new OprationBarcodeList();

               //report.SetDataSource(list.StickerBarcodeList(pBarocde.Options, pBarocde.CutNo, pBarocde.From, pBarocde.To));

               //this.crystalReportViewer1.ReportSource = report;

                BarcodeLabel lbl = new BarcodeLabel();
                lbl.DataSource = list.StickerBarcodeList(pBarocde.Options, pBarocde.CutNo, pBarocde.From, pBarocde.To);
                ReportPrintTool tool = new ReportPrintTool(lbl);
                tool.ShowPreview();


                splashScreenManager1.CloseWaitForm();
            }catch(Exception ex)
            {
                MessageBox.Show(ex.Message);
                Debug.WriteLine(ex.Message);
            }
           
          
          
        }
示例#10
0
 public void Execute()
 {
     if (Prizm.Main.Common.DateExtension.CheckDiapason(viewModel.StartDate, viewModel.EndDate))
     {
         try
         {
             data = repo.GetPipesFromInspection(viewModel.StartDate, viewModel.EndDate);
             IncomingReportsXtraReport report = new IncomingReportsXtraReport();
             SetDataSortByColumn("number");
             data.TranslateStatus<PartInspectionStatus>(SQLProvider.TableNameForInspectionReport, SQLProvider.ColumnNameForInspectionStatus, viewModel.localizedInspectionStatus);
             report.DataSource = data;
             report.FootersVisibility = viewModel.IsFooterVisible;
             report.CreateDocument();
             var tool = new ReportPrintTool(report);
             tool.AutoShowParametersPanel = false;
             tool.ShowPreview();
         }
         catch (RepositoryException ex)
         {
             log.Error(string.Concat(ex.InnerException.Message, ex.Message));
             notify.ShowFailure(ex.InnerException.Message, ex.Message);
         }
     }
     else
     {
         notify.ShowInfo(Program.LanguageManager.GetString(StringResources.Message_FailureReportDate),
             Program.LanguageManager.GetString(StringResources.Message_FailureReportDateHeader));
         log.Warn("Date limits not valid!" + "Diapason: start date= "
             + viewModel.StartDate.ToString() + " end date= " + viewModel.EndDate.ToString());
     }
 }
示例#11
0
        public static void DoPrint(string pono,bool t)
        {
            var dm = new PoDataManager();
            var rpt = new RptPO();
            if (t)
            {
                rpt.Watermark.Text = "Internal Copy";
            }
            else
            {
                rpt.Watermark.Text = "Supplier Copy";
                dm.UpdatePrint(pono);
            }
            rpt.Watermark.TextDirection = DirectionMode.ForwardDiagonal;
            rpt.Watermark.Font = new Font(rpt.Watermark.Font.FontFamily, 50);
            rpt.Watermark.ForeColor = Color.Gray;
            rpt.Watermark.TextTransparency = 150;
            rpt.Watermark.ShowBehind = false;
            rpt.Company = Utils.Companyname;
            var ds = dm.DoPrint(pono);
            rpt.DataSource = ds;
            ReportPrintTool printTool = new ReportPrintTool(rpt);
           // printTool.ShowPreviewDialog();
            printTool.ShowPreview();

           // rpt.Print();
        }
        private void GetData(DateTime _fromDate,DateTime _toDate){
           try {
            
               var DataList =  from items in _OperationRepository.GetAll().ToList()

                              where items.Date >= _fromDate && items.Date >= _toDate

                               orderby items.WorkstationNo  
                               
                               select items;

               foreach (var pcs in DataList)
               {

                   lstProduction.Add(new HourlyIndividualProduction { EmployeeID=pcs.EmployeeID, Name=GetEmployeeNameByID(pcs.EmployeeID),   WorkstationNo=pcs.WorkstationNo,OperationNo=pcs.OperationNo,OperationName=pcs.OperationName,HourNo=pcs.HourNo,Efficiency=pcs.Efficiency,EarnSAH=pcs.SAH ,PCS=pcs.Pcs,Date=pcs.Date,StyleNo=pcs.StyleNo});
               
               }



               HourlyProductionByOperation report = new HourlyProductionByOperation();
               report.DataSource = lstProduction;
               ReportPrintTool tool = new ReportPrintTool(report);
               report.PrintingSystem.Document.AutoFitToPagesWidth = 1;
               tool.ShowPreview();


            }
            catch(Exception ex){
            
            }
        
        }
示例#13
0
        private void btnListeYazdir_Click(object sender, EventArgs e)
        {
            if (gvListe.FocusedRowHandle < 0) return;

              ReportPrintTool pt1 = new ReportPrintTool(
            InitReport(InitData())
            );
              pt1.ShowPreviewDialog();
        }
 private void ReportClick(object sender, EventArgs e)
 {
     ArrayList v_arr_list = new ArrayList();
     v_arr_list.Add(new iParameter("iP_tieu_de_bao_cao", "BAO CAO DANH MUC MON HOC"));
     v_arr_list.Add(new iParameter("iP_trung_tam", "TO HOP GIAO DUC TOPICA"));
     v_arr_list.Add(new iParameter("iP_date_time", "Hà Nội, ngày 23 tháng 7 năm 2015"));
     BKI_QLTTQuocAnh.BaoCao.RPT_XtraReport v_xr = new BKI_QLTTQuocAnh.BaoCao.RPT_XtraReport(m_ds, m_grv, v_arr_list, System.Drawing.Printing.PaperKind.A4, true);
     ReportPrintTool v_xrpt = new ReportPrintTool(v_xr);
     v_xrpt.ShowPreview();
 }
        private void btnPrint_Click(object sender, EventArgs e)
        {
            // List<sp_BookingExt_GetAllBooking_Result> aListAllBookingEN = new List<sp_BookingExt_GetAllBooking_Result>();

            frmRpt_Revenues aReport = new frmRpt_Revenues(aListAllBookingEN, From,To,
                SumServiceHalls1_NotTax, SumServiceHalls2_NotTax, SumServiceHalls3_NotTax,
                SumServiceRooms1_NotTax, SumServiceRooms2_NotTax, SumServiceRooms3_NotTax);
            ReportPrintTool tool = new ReportPrintTool(aReport);
            tool.ShowPreview();
        }
示例#16
0
        private void btnIn_Click(object sender, EventArgs e)
        {
            ExtraReport_PD report = new ExtraReport_PD(this.txtMaSV.Text.Trim().ToString());

            report.txtLop.Text    = lookUpEditLop.Text;
            report.txtHoTen.Text  = lookUpEdit1.Text;
            report.txtAuthor.Text = "Người In Ấn : " + Program.MHoten;
            ReportPrintTool print = new ReportPrintTool(report);

            print.ShowPreviewDialog();
        }
示例#17
0
        private void barBtnXuatBaoCao_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (Object.Equals(_ViTriHienTai, null))
            {
                XtraMessageBox.Show("Chưa chọn vị trí!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (Object.Equals(listPhong, null))
            {
                XtraMessageBox.Show("Không có phòng!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            else
            {
                String strViTri = _ViTriHienTai.coso != null ? _ViTriHienTai.coso.ten + (_ViTriHienTai.day != null ? " - " + _ViTriHienTai.day.ten + (_ViTriHienTai.tang != null ? " - " + _ViTriHienTai.tang.ten : "") : "") : "";
                if (listPhong.Count > 0)
                {
                    try
                    {
                        DevExpress.XtraSplashScreen.SplashScreenManager splashScreenManager_Report = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::PTB_GUI.WaitForm1), true, true, DevExpress.XtraSplashScreen.ParentType.UserControl);
                        splashScreenManager_Report.ShowWaitForm();
                        splashScreenManager_Report.SetWaitFormCaption("Đang tạo report");
                        splashScreenManager_Report.SetWaitFormDescription("Vui lòng chờ trong giây lát...");

                        XtraReport_Template _XtraReport_Template = new XtraReport_Template(SHARED.Libraries.ReportHelper.FillDatasetFromGrid(gridViewPhong), gridViewPhong, barCheckItemLandscape.Checked);
                        _XtraReport_Template.SetTitleText("Danh Sách Phòng Tại: " + strViTri);
                        if (barCheckItemThietKe.Checked)
                        {
                            ReportDesignTool designTool = new ReportDesignTool(_XtraReport_Template);
                            splashScreenManager_Report.CloseWaitForm();
                            designTool.ShowDesignerDialog();

                            ReportPrintTool printTool = new ReportPrintTool(designTool.Report);
                            printTool.ShowPreviewDialog();
                        }
                        else
                        {
                            ReportPrintTool printTool = new ReportPrintTool(_XtraReport_Template);
                            splashScreenManager_Report.CloseWaitForm();
                            printTool.ShowPreviewDialog();
                        }
                    }
                    catch
                    {
                        XtraMessageBox.Show("Đã xảy ra lỗi!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
                else
                {
                    strViTri = "[" + strViTri + "]";
                    XtraMessageBox.Show(strViTri + " không có phòng!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
        private void Report_Print_Preview(string action)
        {
            XtraReport_EmployeeAttendance Xtra_Report_EmployeeAttendanceList = new XtraReport_EmployeeAttendance();

            DynamicParameters paramSalary = new DynamicParameters();

            paramSalary.Add("@Emp_Code_Processing", txtEmpCode.EditValue);
            paramSalary.Add("@Salary_Month", DtStartDate.EditValue);
            paramSalary.Add("@Deduct_Advance", 1);
            paramSalary.Add("@Deduct_Loan", 1);
            paramSalary.Add("@TeaRate", 0);
            paramSalary.Add("@NoOfCups", 0);


            DynamicParameters param = new DynamicParameters();

            param.Add("@EmpCode", txtEmpCode.EditValue);
            param.Add("@Attendance_Month", DtStartDate.EditValue);

            DynamicParameters paramEmp = new DynamicParameters();

            paramEmp.Add("@EmpCode", txtEmpCode.EditValue);

            ProgramMasterModel programMaster = ProgramMasterData.GetProgramMasterModel(GlobalVariables.ProgCode);



            EmployeeAttendanceDetails_Model employeeAttendanceDetails_Model = new EmployeeAttendanceDetails_Model
            {
                EmpCode                     = txtEmpCode.EditValue + string.Empty,
                AttendanceMonth             = ConvertTo.DateTimeVal(DtStartDate.EditValue),
                EmployeeAttendance_Get_List = EmployeeData.EmployeeAttendance_Get(programMaster.ProgProcName + "_v2", param),
                EmployeesSalaryList         = EmployeeData.GetEmployeesSalaryList("sp_Salary_Process", paramSalary),
                EmployeeMasterDataList      = EmployeeData.GetEmployeeMasterDataList("sp_LoadEmpMstFEditing", paramEmp)
            };

            //EmployeeMasterModel
            attendanceBindingSource.DataSource = employeeAttendanceDetails_Model;

            Xtra_Report_EmployeeAttendanceList.DataSource = attendanceBindingSource;

            //MessageBox.Show(employeeAttendanceDetails_Model.EmployeesSalaryList.Count + "");

            ReportPrintTool tool = new ReportPrintTool(Xtra_Report_EmployeeAttendanceList);

            if (action.Equals("preview"))
            {
                tool.ShowRibbonPreviewDialog();
            }
            if (action.Equals("print"))
            {
                tool.PrintDialog();
            }
        }
示例#19
0
        private void btnIn_Click(object sender, EventArgs e)
        {
            string maLop  = cmbLop.SelectedValue.ToString();
            string maMH   = cmbMonHoc.SelectedValue.ToString();
            int    lanThi = Int32.Parse(seLANTHI.Value.ToString());

            XtraReportDSThiHetMon rp    = new XtraReportDSThiHetMon(maLop, maMH, lanThi);
            ReportPrintTool       print = new ReportPrintTool(rp);

            print.ShowPreviewDialog();
        }
示例#20
0
        private void btPrint_Click(object sender, EventArgs e)
        {
            XprtBDMH rpt = new XprtBDMH(CbTenLop.Text, CbTenMH.Text, CbLan.Text);

            rpt.txtLop.Text = CbTenLop.Text;
            rpt.txtMon.Text = CbTenMH.Text;
            rpt.txtLan.Text = CbLan.Text;
            ReportPrintTool rp = new ReportPrintTool(rpt);

            rp.ShowPreview();
        }
示例#21
0
        private void ShowPrintDialog()
        {
            MonthlyRembursementSalaryItem item = bandedGridView1.GetRow(bandedGridView1.FocusedRowHandle) as MonthlyRembursementSalaryItem;

            if (item != null)
            {
                RembursementSalaryVoucher report = new RembursementSalaryVoucher(item);
                ReportPrintTool           tool   = new ReportPrintTool(report);
                tool.ShowPreview();
            }
        }
        public ReportColumnSortHelper(XtraReport report)
        {
            Report    = report;
            PrintTool = new ReportPrintTool(report);

            List <XRLabel> sortCells = new List <XRLabel>();

            sortItems = new List <HelpSortItem>();
            InitHeaderCells(sortCells);
            InitClearSortingCell();
        }
示例#23
0
        private void printToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int frtID = (int)gridView1.GetFocusedRowCellValue(colFRTID);

            BaBsMtkbtFrmXR rpr = new BaBsMtkbtFrmXR(frtID, dateEdit1.DateTime, dateEdit2.DateTime);

            using (ReportPrintTool printTool = new ReportPrintTool(rpr))
            {
                printTool.ShowPreviewDialog();
            }
        }
示例#24
0
        void CargarGrid()
        {
            try
            {
                switch (param.IdCliente_Ven_x_Default)
                {
                case Cl_Enumeradores.eCliente_Vzen.NATURISA:

                    XINV_Rpt029_rpt Reporte = new XINV_Rpt029_rpt();
                    Reporte.RequestParameters = false;
                    ReportPrintTool pt = new ReportPrintTool(Reporte);
                    pt.AutoShowParametersPanel = false;

                    Reporte.Parameters["IdEmpresa"].Value     = param.IdEmpresa;
                    Reporte.Parameters["IdSucursal"].Value    = (ucInv_Menu.cmbSucursal.EditValue == null) ? 0 : ucInv_Menu.cmbSucursal.EditValue;
                    Reporte.Parameters["IdSucursalFin"].Value = (ucInv_Menu.cmbSucursal.EditValue == null || Convert.ToInt32(ucInv_Menu.cmbSucursal.EditValue) == 0) ? 99999 : Convert.ToInt32(ucInv_Menu.cmbSucursal.EditValue);
                    Reporte.Parameters["FechaIni"].Value      = ucInv_Menu.dtpDesde.EditValue;
                    Reporte.Parameters["FechaFin"].Value      = ucInv_Menu.dtpHasta.EditValue;
                    Reporte.Parameters["nom_Sucursal"].Value  = ucInv_Menu.cmbSucursal.Edit.GetDisplayText(ucInv_Menu.cmbSucursal.EditValue);
                    Reporte.set_lista(ucInv_Menu.Get_list_bodega_chk());
                    Reporte.PRegistro_Cero.Value = ucInv_Menu.beiCheck1.EditValue;
                    Reporte.P_toma_física.Value  = ucInv_Menu.beiCheck2.EditValue;
                    printControl1.PrintingSystem = Reporte.PrintingSystem;

                    Reporte.CreateDocument();
                    break;

                default:
                    XINV_Rpt029_rpt Reporte_ge = new XINV_Rpt029_rpt();
                    Reporte_ge.RequestParameters = false;
                    ReportPrintTool pt_ge = new ReportPrintTool(Reporte_ge);
                    pt_ge.AutoShowParametersPanel = false;

                    Reporte_ge.Parameters["IdEmpresa"].Value     = param.IdEmpresa;
                    Reporte_ge.Parameters["IdSucursal"].Value    = (ucInv_Menu.cmbSucursal.EditValue == null) ? 0 : ucInv_Menu.cmbSucursal.EditValue;
                    Reporte_ge.Parameters["IdSucursalFin"].Value = (ucInv_Menu.cmbSucursal.EditValue == null || Convert.ToInt32(ucInv_Menu.cmbSucursal.EditValue) == 0) ? 99999 : Convert.ToInt32(ucInv_Menu.cmbSucursal.EditValue);
                    Reporte_ge.Parameters["FechaIni"].Value      = ucInv_Menu.dtpDesde.EditValue;
                    Reporte_ge.Parameters["FechaFin"].Value      = ucInv_Menu.dtpHasta.EditValue;
                    Reporte_ge.Parameters["nom_Sucursal"].Value  = ucInv_Menu.cmbSucursal.Edit.GetDisplayText(ucInv_Menu.cmbSucursal.EditValue);
                    Reporte_ge.set_lista(ucInv_Menu.Get_list_bodega_chk());
                    Reporte_ge.PRegistro_Cero.Value = ucInv_Menu.beiCheck1.EditValue;
                    Reporte_ge.P_toma_física.Value  = ucInv_Menu.beiCheck2.EditValue;
                    printControl1.PrintingSystem    = Reporte_ge.PrintingSystem;

                    Reporte_ge.CreateDocument();
                    break;
                }
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#25
0
        public void Imprimir()
        {
            Reportes.Rep_Factura report = new Reportes.Rep_Factura();
            BD_JSYSEntities      db     = new BD_JSYSEntities();
            var id_factura = db.FACTURAS.Where(r => r.CREADO_POR == S_Utilidades.Datos_Usuario.USUARIO).Max(r => r.ID_FACTURA);

            report.FilterString = "([ID_FACTURA]= " + id_factura + ")";
            ReportPrintTool tool = new ReportPrintTool(report);

            tool.ShowPreview();
        }
示例#26
0
        private void btnPreview_Click(object sender, EventArgs e)
        {
            rptDSDKThi rpt = new rptDSDKThi(dptNgay1.Text.Trim(), dptNgay2.Text.Trim());

            rpt.lblCoSo.Text = ((DataRowView)Program.bds_dspm[Program.mCoso])["TEN_COSO"].ToString();
            rpt.lblNgay.Text = "TỪ NGÀY " + Program.FormatDate(dptNgay1.Text.Trim()) + " ĐẾN NGÀY " + Program.FormatDate(dptNgay2.Text.Trim());

            ReportPrintTool print = new ReportPrintTool(rpt);

            print.ShowPreviewDialog();
        }
示例#27
0
        private void showPreviewBtn_Click(object sender, EventArgs e)
        {
            XtraReport_DSNhanVien rpt = new XtraReport_DSNhanVien(comboBoxBranch.Text.Trim());

            rpt.rptTitle.Text = $"Danh sách nhân viên {comboBoxBranch.Text.Trim()}";
            ReportPrintTool print = new ReportPrintTool(rpt);

            print.PreviewForm.SaveState     = false;
            print.PreviewForm.StartPosition = FormStartPosition.CenterScreen;
            print.ShowPreviewDialog();
        }
示例#28
0
        private void btnMayIn_Click(object sender, EventArgs e)
        {
            this.sP_DanhSachHocPhiLopTableAdapter.Connection.ConnectionString = Program.connstr;
            this.sP_DanhSachHocPhiLopTableAdapter.Fill(this.qLDSVROOT.SP_DanhSachHocPhiLop, comboMaLop.Text, comboNienKhoa.Text, new System.Nullable <int>(((int)(System.Convert.ChangeType(comboHocKy.Text, typeof(int))))));
            sendTongDaDong = handleHocPhi();
            BaoCao.xRpt_InDanhSachHocPhiLop_spDanhSachHocPhiLop rpt = new BaoCao.xRpt_InDanhSachHocPhiLop_spDanhSachHocPhiLop(comboMaLop.Text, comboNienKhoa.Text, comboHocKy.Text, sendTongDaDong);
            rpt.lbML.Text = comboMaLop.Text;
            ReportPrintTool print = new ReportPrintTool(rpt);

            print.ShowPreviewDialog();
        }
示例#29
0
        public void PrintDialog()
        {
            RequestParameters = false;

            CreateDocument();

            using (var printTool = new ReportPrintTool(this))
            {
                printTool.PrintDialog();
            }
        }
示例#30
0
        private void ucBa_Menu_Reportes1_event_btnRefrescar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                int idBanco    = 0;
                int idBancoFin = 0;
                if (this.ucBa_Menu_Reportes1.get_idBanco() == 0)
                {
                    idBanco    = 1;
                    idBancoFin = 999999;
                }
                else
                {
                    idBanco    = Convert.ToInt32(ucBa_Menu_Reportes1.get_idBanco());
                    idBancoFin = idBanco;
                }

                XBAN_Rpt002_rpt Reporte = new XBAN_Rpt002_rpt();

                Reporte.RequestParameters = false;
                ReportPrintTool pt = new ReportPrintTool(Reporte);
                pt.AutoShowParametersPanel = false;

                Reporte.Parameters["IdEmpresa"].Value         = param.IdEmpresa;
                Reporte.Parameters["IdBanco"].Value           = idBanco;
                Reporte.Parameters["IdBancoFin"].Value        = idBancoFin;
                Reporte.Parameters["CodTipoCbteBan"].Value    = ucBa_Menu_Reportes1.get_tipoCbtes();
                Reporte.Parameters["Fch_Ini"].Value           = ucBa_Menu_Reportes1.get_FchIni();
                Reporte.Parameters["Fch_Fin"].Value           = ucBa_Menu_Reportes1.get_FchFin();
                Reporte.Parameters["S_Empresa"].Value         = param.NombreEmpresa;
                Reporte.Parameters["S_Banco"].Value           = ucBa_Menu_Reportes1.get_NomBanco();
                Reporte.Parameters["S_CbteDescripcion"].Value = ucBa_Menu_Reportes1.get_DesTipoCbtes();

                if (ucBa_Menu_Reportes1.get_cmbNomBeneficiario().IdPersona != 0)
                {
                    Reporte.Parameters["IdPersonaGirado"].Value = ucBa_Menu_Reportes1.get_cmbNomBeneficiario().IdPersona;
                    Reporte.Parameters["S_PersonaGirado"].Value = ucBa_Menu_Reportes1.get_cmbNomBeneficiario().pe_nombreCompleto;
                }
                else
                {
                    Reporte.Parameters["S_PersonaGirado"].Value = "TODOS";
                }



                printControl1.PrintingSystem = Reporte.PrintingSystem;
                Reporte.CreateDocument();
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#31
0
        private void btnPre_Click(object sender, EventArgs e)
        {
            Xrpt_BDMH rpt = new Xrpt_BDMH(txtMALOP.Text, txtMAMH.Text, int.Parse(cmbLAN.Text));

            rpt.lblLop.Text    = cmbTENLOP.Text;
            rpt.lblMonhoc.Text = cmbTENMH.Text;
            rpt.lblLan.Text    = cmbLAN.Text;
            ReportPrintTool print = new ReportPrintTool(rpt);

            print.ShowPreviewDialog();
        }
示例#32
0
        private void In_Click(object sender, EventArgs e)
        {
            //masv = "N15DCCN002";
            masv = txtMaSV.Text;
            rptPhieuDiem rpt = new rptPhieuDiem(masv);

            rpt.lbTenLop.Text = cmbMaLop.Text;
            ReportPrintTool print = new ReportPrintTool(rpt);

            print.ShowPreviewDialog();
        }
        /// <summary>
        /// Allow a method for testing without the designer, a preview of sorts
        /// From here you can print or export
        /// </summary>
        private void btnPreview_Click(object sender, EventArgs e)
        {
            myXtraReport r = new myXtraReport();

            r.DataSource = FillDataset().Tables["Ticket"];
            r.LoadLayout(Application.StartupPath + "\\XtraReport1.repx");

            ReportPrintTool printTool = new ReportPrintTool(r);

            printTool.ShowPreview();
        }
示例#34
0
        private void ShowPrintDialog()
        {
            MonthlyWageLoanItem item = bandedGridView1.GetRow(bandedGridView1.FocusedRowHandle) as MonthlyWageLoanItem;

            if (item != null)
            {
                WageLoanVoucher report = new WageLoanVoucher(item);
                ReportPrintTool tool   = new ReportPrintTool(report);
                tool.ShowPreview();
            }
        }
示例#35
0
        private void btnGunlukSatisCikti_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            SatisRapor report = new SatisRapor();

            report.DataSource = new SatisRepo().SatisRaporu();

            using (ReportPrintTool printTool = new ReportPrintTool(report))
            {
                printTool.PrintDialog();
            }
        }
示例#36
0
文件: frmINPD.cs 项目: lquynh/QLDSV
        private void btnInPD_Click(object sender, EventArgs e)
        {
            INPD rpt = new INPD(masv);

            rpt.lblMSSV.Text  += masv;
            rpt.lblHoTen.Text += txtTen.Text.Trim();
            rpt.lblLop.Text   += cmbLop.Text.Trim();
            ReportPrintTool print = new ReportPrintTool(rpt);

            print.ShowPreviewDialog();
        }
        private void bandedGridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
        {
            MonthlyWageLoanItem item = bandedGridView1.GetRow(bandedGridView1.FocusedRowHandle) as MonthlyWageLoanItem;

            if (item != null && e.Column.Caption == "打印")
            {
                WageLoanVoucher report = new WageLoanVoucher(item);
                ReportPrintTool tool   = new ReportPrintTool(report);
                tool.PrintDialog();
            }
        }
示例#38
0
        private void btnPreview_Click(object sender, EventArgs e)
        {
            BaoCao.xRpt_SPDSDONGHOCPHI rpt = new BaoCao.xRpt_SPDSDONGHOCPHI(cmbMaLop.SelectedValue.ToString(), cmbNienKhoa.SelectedValue.ToString(), int.Parse(cmbHocKy.SelectedValue.ToString()));
            rpt.lblMaLop.Text    = "Mã lớp:  " + cmbMaLop.SelectedValue.ToString();
            rpt.lblTenLop.Text   = "Tên lớp:  " + txtTenLop.Text;
            rpt.lblNienKhoa.Text = "Niên khóa:  " + cmbNienKhoa.SelectedValue.ToString();
            rpt.lblHocKy.Text    = "Học kỳ:  " + cmbHocKy.SelectedValue.ToString();
            ReportPrintTool print = new ReportPrintTool(rpt);

            print.ShowPreviewDialog();
        }
示例#39
0
文件: ParamUI.cs 项目: pvx/ShopOrder
        public override void ExecuteReport()
        {
            base.ExecuteReport();

            var sh = cbShop.Properties.Items.GetCheckedValues();
            var tbShop = new DataTable();
            tbShop.Columns.Add("Id", typeof(string));
            sh.ForEach(x => tbShop.Rows.Add(x));

            var sp = cbSupplier.Properties.Items.GetCheckedValues();
            var tbSuppl = new DataTable();
            tbSuppl.Columns.Add("Id", typeof(string));
            sp.ForEach(x => tbSuppl.Rows.Add(x));

            var sg = cbGroup.Properties.Items.GetCheckedValues();
            var tbGp = new DataTable();
            tbGp.Columns.Add("Id", typeof(string));
            sg.ForEach(x => tbGp.Rows.Add(x));

            string suppl = string.Join(", ", sp);
            string group = string.Join(", ", sg);

            try
            {
                Parameter.Connection.Open();
                using (
                    var command = new SqlCommand("rep_sel_OrederByShop", Parameter.Connection)
                                      {CommandType = CommandType.StoredProcedure, CommandTimeout = 60000})
                {
                    command.Parameters.AddWithValue("@dateBeg", dateBeg.DateTime.Date);
                    command.Parameters.AddWithValue("@dateEnd", dateEnd.DateTime.Date);
                    command.Parameters.AddWithValue("@ShopCodes", tbShop);

                    command.Parameters.AddWithValue("@Suppliers", tbSuppl);
                    command.Parameters.AddWithValue("@GoodGroups", tbGp);

                    var rep = new XtraReport1() {DataAdapter = new SqlDataAdapter(command)};
                    rep.Parameters["pDate"].Value = string.Format("Период: {0} по {1}", dateBeg.DateTime.Date.ToShortDateString(), dateEnd.DateTime.Date.ToShortDateString());

                    rep.Parameters["pGroup"].Value = string.Format("Товарная группа: {0}", string.IsNullOrEmpty(group) ? "Все" : group);
                    rep.Parameters["pSuppl"].Value = string.Format("Поставщик: {0}", string.IsNullOrEmpty(suppl) ? "Все" : suppl);

                    var reportPrintTool = new ReportPrintTool(rep) {AutoShowParametersPanel = false};
                    reportPrintTool.ShowPreviewDialog();
                }
            }
            finally
            {
                Parameter.Connection.Close();
            }

            //MessageBox.Show("ExecuteReport " + table.Rows.Count.ToString());
        }
示例#40
0
文件: LogPre.cs 项目: 1extra/prog2015
 private void button1_Click(object sender, EventArgs e)
 {
     var Buf = new List<string>();
     foreach (string item in listBox1.Items)
     {
         Buf.Add(item);
     }
     var r = new XtraReport1();
     r.AddLabel(Buf, new Rectangle(0,0,630,23));
     var printTool = new ReportPrintTool(r);
     printTool.ShowPreview();
 }
 private void btnPrintPerformance_Click(object sender, EventArgs e)
 {
     try
     {
         frmRpt_Performance_Rooms afrmRpt_Performance_Rooms = new frmRpt_Performance_Rooms(dtpFrom.DateTime, dtpTo.DateTime, 1);// 1 = IDLang
         ReportPrintTool tool = new ReportPrintTool(afrmRpt_Performance_Rooms);
         tool.ShowPreview();
     }catch(Exception ex)
     {
         MessageBox.Show("frmTsk_CalculationEfficiency.btnPrintPerformance_Click\n" + ex.ToString());
     }
 }
示例#42
0
 private void btnPrint_Click(object sender, EventArgs e)
 {
     if (LUEItems.EditValue == null)
     {
         return;
     }
     DataSources.dsTinyData.ProductsRow row = (DataSources.dsTinyData.ProductsRow)((DataRowView)LUEItems.GetSelectedDataRow()).Row;
     XrepBarcode rep = new XrepBarcode(row.ProductNumber, row.SellPrice.ToString());
     // Create a Print Tool and show the Print Preview form. 
     ReportPrintTool printTool = new ReportPrintTool(rep);
     printTool.ShowPreview();
 }
示例#43
0
        private void button1_Click(object sender, EventArgs e)
        {
            XtraReport1 report = new XtraReport1();
            //// Add bounded labels to the Detail band of the report.
            report._bindData();
            report._group();
            report.DataSource = NhanVienPT.getAll();

            ReportPrintTool printTool = new ReportPrintTool(report);

            printTool.ShowRibbonPreview();
        }
        public void CheckOut(int discount, float finalPrice, int id_bill, int usingPoint = 0, int id_member = 0)
        {
            CheckoutReport report = new CheckoutReport();

            report.DataSource = BillDetailBus.Instance.getListBillDetailByBill(id_bill);
            report.Parameters["Discount"].Value   = discount;
            report.Parameters["CreateDate"].Value = DateTime.Now;
            report.Parameters["TotalPrice"].Value = finalPrice;
            ReportPrintTool tool = new ReportPrintTool(report);

            tool.ShowPreview();
        }
示例#45
0
        private void attendantListToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var source = _db.Attendants.Where(a => !a.IsInactive).OrderBy(a => a.AgeGroupID).ThenBy(a => a.LastName).ThenBy(a => a.FirstName).ToList();
            var report = new AttendantListReport();

            report.DataSource = source;

            using (ReportPrintTool printTool = new ReportPrintTool(report))
            {
                printTool.ShowRibbonPreviewDialog();
            }
        }
示例#46
0
        private void ucCaj_Menu_Reportes_event_btnGenerar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                if (ucCaj_Menu_Reportes.cmb_TipoIngEgr.EditValue.ToString() == null)
                {
                    TipoIngrEgr = "";
                }
                else
                if (ucCaj_Menu_Reportes.cmb_TipoIngEgr.EditValue.ToString() == "Ingresos")
                {
                    TipoIngrEgr = "+";
                }
                else
                if (ucCaj_Menu_Reportes.cmb_TipoIngEgr.EditValue.ToString() == "Egresos")
                {
                    TipoIngrEgr = "-";
                }
                else
                {
                    TipoIngrEgr = "";
                }


                XCAJ_Rpt002_Rpt Reporte = new XCAJ_Rpt002_Rpt();
                Reporte.RequestParameters = false;
                ReportPrintTool pt = new ReportPrintTool(Reporte);
                pt.AutoShowParametersPanel = false;

                Reporte.Parameters["PIdEmpresa"].Value      = param.IdEmpresa;
                Reporte.Parameters["PIdCajaIni"].Value      = (Convert.ToInt32(ucCaj_Menu_Reportes.cmb_Caja.EditValue) == 0)? 0: Convert.ToInt32(ucCaj_Menu_Reportes.cmb_Caja.EditValue);
                Reporte.Parameters["PIdCajaFin"].Value      = (Convert.ToInt32(ucCaj_Menu_Reportes.cmb_Caja.EditValue) == 0) ? 99999 : Convert.ToInt32(ucCaj_Menu_Reportes.cmb_Caja.EditValue);
                Reporte.Parameters["PIdTipoMoviIni"].Value  = (Convert.ToInt32(ucCaj_Menu_Reportes.cmb_TipoMovi.EditValue) == 0) ? 0 : Convert.ToInt32(ucCaj_Menu_Reportes.cmb_TipoMovi.EditValue);
                Reporte.Parameters["PIdTipoMoviFin"].Value  = (Convert.ToInt32(ucCaj_Menu_Reportes.cmb_TipoMovi.EditValue) == 0) ? 99999 : Convert.ToInt32(ucCaj_Menu_Reportes.cmb_TipoMovi.EditValue);
                Reporte.Parameters["PTipoIngrEgr"].Value    = TipoIngrEgr;
                Reporte.Parameters["PFechaIni"].Value       = ucCaj_Menu_Reportes.dtFechaIni.EditValue;
                Reporte.Parameters["PFechaFin"].Value       = ucCaj_Menu_Reportes.dtFechaFin.EditValue;
                Reporte.Parameters["PIdPersonaIni"].Value   = (Convert.ToString(ucCaj_Menu_Reportes.cmb_Beneficiario.EditValue) == "") ? 0 : Convert.ToDecimal(ucCaj_Menu_Reportes.get_Info_Beneficiario().IdPersona);
                Reporte.Parameters["PIdPersonaFin"].Value   = (Convert.ToString(ucCaj_Menu_Reportes.cmb_Beneficiario.EditValue) == "") ? 99999 : Convert.ToDecimal(ucCaj_Menu_Reportes.get_Info_Beneficiario().IdPersona);
                Reporte.Parameters["PIdEntidadIni"].Value   = (Convert.ToString(ucCaj_Menu_Reportes.cmb_Beneficiario.EditValue) == "") ? 0 : Convert.ToDecimal(ucCaj_Menu_Reportes.get_Info_Beneficiario().IdEntidad);
                Reporte.Parameters["PIdEntidadFin"].Value   = (Convert.ToString(ucCaj_Menu_Reportes.cmb_Beneficiario.EditValue) == "") ? 99999 : Convert.ToDecimal(ucCaj_Menu_Reportes.get_Info_Beneficiario().IdEntidad);
                Reporte.Parameters["PIdTipoFlujoIni"].Value = (Convert.ToInt32(ucCaj_Menu_Reportes.cmb_TipoFlujo.EditValue) == 0) ? 0 : Convert.ToInt32(ucCaj_Menu_Reportes.cmb_TipoFlujo.EditValue);
                Reporte.Parameters["PIdTipoFlujoFin"].Value = (Convert.ToInt32(ucCaj_Menu_Reportes.cmb_TipoFlujo.EditValue) == 0) ? 99999 : Convert.ToInt32(ucCaj_Menu_Reportes.cmb_TipoFlujo.EditValue);
                Reporte.Parameters["PIdTipo_Persona"].Value = (Convert.ToString(ucCaj_Menu_Reportes.cmb_Beneficiario.EditValue) == null) ? "" : Convert.ToString(ucCaj_Menu_Reportes.get_Info_Beneficiario().IdTipo_Persona);
                printControl1.PrintingSystem = Reporte.PrintingSystem;
                Reporte.CreateDocument();
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#47
0
        void ConsultarDatos()
        {
            try
            {
                XFAC_Rpt005_rpt Reporte  = new XFAC_Rpt005_rpt();
                string          tipoPago = "";

                if (ucFa_Menu.cmbTipoPago.EditValue == "Todos")
                {
                    tipoPago = "TODO";
                }

                if (ucFa_Menu.cmbTipoPago.EditValue == "Pendientes por Cobrar")
                {
                    tipoPago = "PENDI";
                }

                if (ucFa_Menu.cmbTipoPago.EditValue == "Pagados")
                {
                    tipoPago = "PAGAD";
                }


                Reporte.RequestParameters = false;
                ReportPrintTool pt = new ReportPrintTool(Reporte);

                pt.AutoShowParametersPanel = false;


                Reporte.Parameters["IdEmpresa"].Value       = param.IdEmpresa;
                Reporte.Parameters["IdSucursalIni"].Value   = (ucFa_Menu.cmbSucursal.EditValue == null) ? 0 : ucFa_Menu.cmbSucursal.EditValue;
                Reporte.Parameters["IdSucursalFin"].Value   = (ucFa_Menu.cmbSucursal.EditValue == null || Convert.ToDecimal(ucFa_Menu.cmbSucursal.EditValue) == 0) ? 999999 : ucFa_Menu.cmbSucursal.EditValue;
                Reporte.Parameters["IdClienteIni"].Value    = (ucFa_Menu.cmbCliente.EditValue == null) ? 0 : ucFa_Menu.cmbCliente.EditValue;
                Reporte.Parameters["IdClienteFin"].Value    = (ucFa_Menu.cmbCliente.EditValue == null || Convert.ToDecimal(ucFa_Menu.cmbCliente.EditValue) == 0) ? 999999 : ucFa_Menu.cmbCliente.EditValue;
                Reporte.Parameters["TipoPago"].Value        = tipoPago;
                Reporte.Parameters["IdTipoDocumento"].Value = ucFa_Menu.cmbTipoDocumento.EditValue;
                Reporte.Parameters["FechaIni"].Value        = ucFa_Menu.dtpDesde.EditValue;
                Reporte.Parameters["FechaFin"].Value        = ucFa_Menu.dtpHasta.EditValue;
                Reporte.Parameters["IdUsuario"].Value       = param.IdUsuario;
                Reporte.Parameters["nomCliente"].Value      = ucFa_Menu.cmbCliente.Edit.GetDisplayText(ucFa_Menu.cmbCliente.EditValue);
                Reporte.Parameters["nomSucursal"].Value     = ucFa_Menu.cmbSucursal.Edit.GetDisplayText(ucFa_Menu.cmbSucursal.EditValue);
                Reporte.Parameters["IdTipoNotaIni"].Value   = (ucFa_Menu.cmbMotivo.EditValue == null) ? 0 : ucFa_Menu.cmbMotivo.EditValue;;
                Reporte.Parameters["IdTipoNotaFin"].Value   = (ucFa_Menu.cmbMotivo.EditValue == null || Convert.ToDecimal(ucFa_Menu.cmbMotivo.EditValue) == 0) ? 999999 : ucFa_Menu.cmbMotivo.EditValue;;

                printControlReporte.PrintingSystem = Reporte.PrintingSystem;
                Reporte.CreateDocument();
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#48
0
        private void ucInv_MenuReportes1_event_tnConsultar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                bool Mostrar_detallado = ucInv_MenuReportes1.beiCheck1.EditValue == null ? false : Convert.ToBoolean(ucInv_MenuReportes1.beiCheck1.EditValue);
                if (!Mostrar_detallado)
                {
                    XINV_Rpt027_Rpt rpt = new XINV_Rpt027_Rpt();
                    rpt.P_Fecha_desde.Value = ucInv_MenuReportes1.dtpDesde.EditValue == null ? DateTime.Now : Convert.ToDateTime(ucInv_MenuReportes1.dtpDesde.EditValue);
                    rpt.P_Fecha_hasta.Value = ucInv_MenuReportes1.dtpHasta.EditValue == null ? DateTime.Now : Convert.ToDateTime(ucInv_MenuReportes1.dtpHasta.EditValue);
                    rpt.P_IdSucursal.Value  = ucInv_MenuReportes1.Get_info_sucursal() == null ? 0 : ucInv_MenuReportes1.Get_info_sucursal().IdSucursal;
                    //rpt.P_IdBodega.Value = ucInv_MenuReportes1.Get_info_bodega() == null ? 0 : ucInv_MenuReportes1.Get_info_bodega().IdBodega;
                    rpt.Set_lst_bodega(ucInv_MenuReportes1.Get_list_bodega_chk());
                    rpt.P_IdProducto.Value          = ucInv_MenuReportes1.Get_info_producto() == null ? 0 : ucInv_MenuReportes1.Get_info_producto().IdProducto;
                    rpt.P_Mostrar_detallado.Value   = Mostrar_detallado;
                    rpt.P_Mostrar_registros_0.Value = ucInv_MenuReportes1.beiCheck2.EditValue == null ? false : Convert.ToBoolean(ucInv_MenuReportes1.beiCheck2.EditValue);

                    rpt.RequestParameters = false;

                    ReportPrintTool pt = new ReportPrintTool(rpt);
                    printControl1.PrintingSystem = rpt.PrintingSystem;
                    splashScreenManager1.ShowWaitForm();
                    rpt.CreateDocument();
                    splashScreenManager1.CloseWaitForm();
                }
                else
                {
                    XINV_Rpt027_Rpt_detallado rpt = new XINV_Rpt027_Rpt_detallado();
                    rpt.P_Fecha_desde.Value = ucInv_MenuReportes1.dtpDesde.EditValue == null ? DateTime.Now : Convert.ToDateTime(ucInv_MenuReportes1.dtpDesde.EditValue);
                    rpt.P_Fecha_hasta.Value = ucInv_MenuReportes1.dtpHasta.EditValue == null ? DateTime.Now : Convert.ToDateTime(ucInv_MenuReportes1.dtpHasta.EditValue);
                    rpt.P_IdSucursal.Value  = ucInv_MenuReportes1.Get_info_sucursal() == null ? 0 : ucInv_MenuReportes1.Get_info_sucursal().IdSucursal;
                    //rpt.P_IdBodega.Value = ucInv_MenuReportes1.Get_info_bodega() == null ? 0 : ucInv_MenuReportes1.Get_info_bodega().IdBodega;
                    rpt.Set_lst_bodega(ucInv_MenuReportes1.Get_list_bodega_chk());
                    rpt.P_IdProducto.Value          = ucInv_MenuReportes1.Get_info_producto() == null ? 0 : ucInv_MenuReportes1.Get_info_producto().IdProducto;
                    rpt.P_Mostrar_detallado.Value   = Mostrar_detallado;
                    rpt.P_Mostrar_registros_0.Value = ucInv_MenuReportes1.beiCheck2.EditValue == null ? false : Convert.ToBoolean(ucInv_MenuReportes1.beiCheck2.EditValue);
                    rpt.P_MostrarNegativos.Value    = ucInv_MenuReportes1.beiCheck3.EditValue == null ? false : Convert.ToBoolean(ucInv_MenuReportes1.beiCheck3.EditValue);
                    rpt.RequestParameters           = false;

                    ReportPrintTool pt = new ReportPrintTool(rpt);
                    printControl1.PrintingSystem = rpt.PrintingSystem;
                    splashScreenManager1.ShowWaitForm();
                    rpt.CreateDocument();
                    splashScreenManager1.CloseWaitForm();
                }
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
                splashScreenManager1.CloseWaitForm();
            }
        }
示例#49
0
        private void familySummaryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var source = AttendantSummary.Load(_db, Properties.Settings.Default.StartDate, Properties.Settings.Default.EndDate);
            var report = new FamilySummaryReport();

            report.DataSource = source;

            using (ReportPrintTool printTool = new ReportPrintTool(report))
            {
                printTool.ShowRibbonPreviewDialog();
            }
        }
示例#50
0
        private void btnInformacoesCliente_Click(object sender, EventArgs e)
        {
            var rowHandle = gridView1.FocusedRowHandle;
            var cod       = gridView1.GetRowCellValue(rowHandle, "IDFCFO");

            relInfoCliente report = new relInfoCliente(cod.ToString());

            using (ReportPrintTool printTool = new ReportPrintTool(report))
            {
                printTool.ShowPreviewDialog();
            }
        }
示例#51
0
文件: Form1.cs 项目: 1extra/prog2015
        public void buttonPrint_Click(object sender, EventArgs e)
        {
            var rpt = new ReportPrintTool(new RegistrationReport()
            {
                DataSource = new BindingSource()
                {
                    DataSource = GetSportsmens()
                }
            });

            rpt.Report.CreateDocument(false);
            rpt.ShowPreview();
        }
示例#52
0
 private void fRpt_Load(object sender, EventArgs e)
 {
     rptDonDatHang _rptDonDatHang = new rptDonDatHang();
     _rptDonDatHang.obj = objDonDatHang;
     _rptDonDatHang.DataSource = dtDonDatHangCT;
     _rptDonDatHang.DataMember = "ChiTietDonHang";
     using (ReportPrintTool printTool = new ReportPrintTool(_rptDonDatHang))
     {
         printTool.ShowRibbonPreviewDialog();
         printTool.ShowRibbonPreview(UserLookAndFeel.Default);
     }
     this.Close();
 }
示例#53
0
        public static void DoPrint(string tranid)
        {
            var dm = new ItemMoveDataManager();
            var rpt = new Reports.RptItemMove { Company = Utils.Companyname , Header = "Item Transfer"};
            var ds = dm.RptItemMove(tranid, Utils.Company);
            rpt.DataSource = ds;
            ReportPrintTool printTool = new ReportPrintTool(rpt);
            
            printTool.ShowPreview();

      
            
        }
示例#54
0
文件: Form1.cs 项目: 1extra/prog2015
        private void button3_Click(object sender, EventArgs e)
        {
            var rpt = new ReportPrintTool(new zayvkaReport1()
            {
                DataSource = new BindingSource()
                {
                    DataSource = GetZakaz()
                }
            });

            rpt.Report.CreateDocument(false);
            rpt.ShowPreview();
        }
示例#55
0
    private void btnPreview_Click(object sender, EventArgs e)
    {
      Properties.Settings.Default.PrintFontName = (string)this.fontEdit1.EditValue;
      Properties.Settings.Default.PrintFontSize = this.spinFontSize.Value;
      Properties.Settings.Default.PrintSortByName = this.rbSortByNumber.Checked;
      Properties.Settings.Default.Save();

      using (var font = new Font(this.fontEdit1.Text, (float)this.spinFontSize.Value))
      using (var report = new ChannelListReport(this.channelList, this.subListIndex, this.rbSortByName.Checked, font))
      using (ReportPrintTool printTool = new ReportPrintTool(report))
      {
        printTool.ShowPreviewDialog();
        printTool.ShowPreview(UserLookAndFeel.Default);
      }
    }
        private void btnPrint_Click(object sender, EventArgs e)
        {
            try
            {

                frmRpt_DetailMenus afrmRpt_DetailMenus = new frmRpt_DetailMenus(this.IDMenu,0);
                ReportPrintTool tool = new ReportPrintTool(afrmRpt_DetailMenus);
                tool.ShowPreview();
                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("frmLst_DetailMenus.btnPrint_Click\n" + ex.ToString(), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#57
0
 private void frmViewBillReport_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F2)
     {
         ReportPrintTool pt = new ReportPrintTool(billReportView);
         pt.PrintingSystem.StartPrint +=
             new PrintDocumentEventHandler(printingSystem_StartPrint);
         pt.PrintDialog();
     }
     else
     {
         if (e.KeyCode == Keys.Escape)
         {
             this.Close();
         }
     }
 }
示例#58
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            ReportPrintTool pt = new ReportPrintTool(new MiniReport());

            // Get the Print Tool's printing system.
            PrintingSystemBase ps = pt.PrintingSystem;

            // Show a report's Print Preview.
            pt.ShowPreviewDialog();

            // Zoom the print preview, so that it fits the entire page.
            ps.ExecCommand(PrintingSystemCommand.ViewWholePage);

            // Invoke the Hand tool.
            ps.ExecCommand(PrintingSystemCommand.HandTool, new object[] { true });

            // Hide the Hand tool.
            ps.ExecCommand(PrintingSystemCommand.HandTool, new object[] { false });
        }
        private void btnPrintList_Click(object sender, EventArgs e)
        {
            frmRpt_VietnameseCustomer aPage1 = new frmRpt_VietnameseCustomer(aListAllCustomer, aListNewCustomer, aListOldCustomer);
            aPage1.DefaultPrinterSettingsUsing.UseLandscape = true;
            aPage1.DefaultPrinterSettingsUsing.UsePaperKind = false;

            aPage1.PrintingSystem.PageSettings.Landscape = true;
            aPage1.PrintingSystem.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.A4Rotated;

            ReportPrintTool tool = new ReportPrintTool(aPage1);
            aPage1.AssignPrintTool(tool);

            tool.PreviewForm.PrintingSystem.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.A4Rotated;
            tool.PreviewForm.PrintingSystem.PageSettings.Landscape = true;

            tool.PreviewRibbonForm.PrintingSystem.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.A4Rotated;
            tool.PreviewRibbonForm.PrintingSystem.PageSettings.Landscape = true;
            tool.ShowPreviewDialog();
        }
        private void GenarateReport()
        {

            try
            {

                rptDailiyProByHour report = new rptDailiyProByHour();
                report.DataSource = GetReportData(Convert.ToDateTime(txtFromDate.Text), Convert.ToDateTime(txttoDate.Text));
                report.Landscape = true;
                report.PrintingSystem.Document.AutoFitToPagesWidth = 1;

                ReportPrintTool tool = new ReportPrintTool(report);

                tool.ShowPreview();

            }
            catch (Exception ex)
            {

            }

        }