当前位置: 首页>>代码示例>>C#>>正文


C# ReportPrintTool.ShowPreviewDialog方法代码示例

本文整理汇总了C#中ReportPrintTool.ShowPreviewDialog方法的典型用法代码示例。如果您正苦于以下问题:C# ReportPrintTool.ShowPreviewDialog方法的具体用法?C# ReportPrintTool.ShowPreviewDialog怎么用?C# ReportPrintTool.ShowPreviewDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ReportPrintTool的用法示例。


在下文中一共展示了ReportPrintTool.ShowPreviewDialog方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: barkodYazdir

 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;
     }
 }
开发者ID:QTechnics,项目名称:QLTOLabel,代码行数:26,代码来源:frmMain.cs

示例2: sbChiTietBaoCao_Click

        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);
            }
        }
开发者ID:TeamOOD,项目名称:QuanLyCuaHangBanLinhKienDienThoai,代码行数:27,代码来源:ucBaoCaoNhapHang.cs

示例3: simpleButton2_Click

        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);
            }
        }
开发者ID:TeamOOD,项目名称:QuanLyCuaHangBanLinhKienDienThoai,代码行数:30,代码来源:ucBaoCaoBanHang.cs

示例4: btnListeYazdir_Click

        private void btnListeYazdir_Click(object sender, EventArgs e)
        {
            if (gvListe.FocusedRowHandle < 0) return;

              ReportPrintTool pt1 = new ReportPrintTool(
            InitReport(InitData())
            );
              pt1.ShowPreviewDialog();
        }
开发者ID:tolgakaradayi,项目名称:StokTakip,代码行数:9,代码来源:frmStokListe.cs

示例5: ExecuteReport

        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());
        }
开发者ID:pvx,项目名称:ShopOrder,代码行数:53,代码来源:ParamUI.cs

示例6: btnPreview_Click

    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);
      }
    }
开发者ID:CIHANGIRCAN,项目名称:ChanSort,代码行数:15,代码来源:ReportOptionsDialog.cs

示例7: simpleButton1_Click

        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 });
        }
开发者ID:ruxchuk,项目名称:A-Team_Clem,代码行数:19,代码来源:XtraForm3.cs

示例8: btnPrintList_Click

        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();
        }
开发者ID:BruceleeThanh,项目名称:Pro_Government_2307,代码行数:19,代码来源:frmTsk_GetListOverNightCustomer.cs

示例9: CreateBooklet

        private void CreateBooklet()
        {
            // Create the 1st report and generate its document.
            //XtraReport1 report1 = new XtraReport1();
            //report1.CreateDocument();

            // Preserve original page numbers on all pages.
               // report1.PrintingSystem.ContinuousPageNumbering = false;

            PrintDocuments.contract report1 = new DXWindowsApplication2.PrintDocuments.contract();

            // Create a booklet.
            int centerPageIndex = Convert.ToInt32((report1.Pages.Count - 1) / 2);
            for (int i = 0; i < centerPageIndex; i++)
            {
                report1.Pages.Insert(i * 2 + 1, report1.Pages[report1.Pages.Count - 1]);
            }

            // Create a Print Tool and show the Print Preview form.
            ReportPrintTool printTool = new ReportPrintTool(report1);
            printTool.ShowPreviewDialog();
        }
开发者ID:neosign,项目名称:DXWindowsApplication2,代码行数:22,代码来源:ListReceipt.cs

示例10: simpleButton_Xuat_Click

        private void simpleButton_Xuat_Click(object sender, EventArgs e)
        {
            switch (comboBoxEdit_LoaiBaoCao.SelectedIndex)
            {
                #region Báo cáo tăng giảm tài sản cố định

                case 0:
                    if (dateEdit_TuNgay.DateTime.Date > DateTime.Today.Date)
                    {
                        XtraMessageBox.Show("Ngày từ không được lớn hơn ngày hiện tại", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        dateEdit_TuNgay.Focus();
                        return;
                    }
                    if (dateEdit_DenNgay.DateTime.Date > DateTime.Today.Date)
                    {
                        XtraMessageBox.Show("Ngày đến không được lớn hơn ngày hiện tại", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        dateEdit_DenNgay.Focus();
                        return;
                    }
                    if (dateEdit_TuNgay.DateTime.Date > dateEdit_DenNgay.DateTime.Date)
                    {
                        XtraMessageBox.Show("Ngày từ không được lớn hơn ngày đến", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        dateEdit_TuNgay.Focus();
                        return;
                    }
                    if (checkEdit_XuatBaoCao.Checked)
                    {
                        IsDesign = false;
                    }
                    else if (checkEdit_ThietKe.Checked)
                    {
                        IsDesign = true;
                    }

                    ShowAndHide(false);
                    labelControl_Status.Text = "Đang tạo report, vui lòng chờ trong giây lát...";

                    _ThreadReport = new System.Threading.Thread(() =>
                    {
                        DevExpress.UserSkins.BonusSkins.Register();
                        Application.EnableVisualStyles();
                        UserLookAndFeel.Default.SetSkinStyle(TSCD.Global.local_setting.ApplicationSkinName);
                        DevExpress.Skins.SkinManager.EnableFormSkins();

                        DateTime From = dateEdit_TuNgay.DateTime.Date, To = dateEdit_DenNgay.DateTime.Date;
                        List<TK_TangGiam_TheoLoaiTS> Data = GetData_BaoCaoTangGiamTaiSanCoDinh(From, To);

                        TSCD_GUI.ReportTSCD.XtraReport_BaoCaoTangGiamTSCD _XtraReport_BaoCaoTangGiamTSCD = new ReportTSCD.XtraReport_BaoCaoTangGiamTSCD(Data, From, To);
                        if (IsDesign)
                        {
                            ReportDesignTool designTool = new ReportDesignTool(_XtraReport_BaoCaoTangGiamTSCD);

                            ReportCompeleted();

                            designTool.ShowDesignerDialog();

                            ReportPrintTool printTool = new ReportPrintTool(designTool.Report);
                            printTool.PreviewForm.PrintControl.Zoom = Zoom;
                            printTool.ShowPreviewDialog();

                            ShowAndHide(true);
                        }
                        else
                        {
                            ReportPrintTool printTool = new ReportPrintTool(_XtraReport_BaoCaoTangGiamTSCD);
                            printTool.PreviewForm.PrintControl.Zoom = Zoom;
                            ReportCompeleted();

                            printTool.ShowPreviewDialog();

                            ShowAndHide(true);
                        }
                    });
                    _ThreadReport.SetApartmentState(ApartmentState.STA);
                    _ThreadReport.Start();
                    break;

                #endregion

                #region Sổ tài sản cố định

                case 1:
                    if (dateEdit_Nam.DateTime.Year > DateTime.Today.Year)
                    {
                        XtraMessageBox.Show("Năm lớn hơn năm hiện tại", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                    }
                    List<Guid> ListLoaiTaiSan = ucComboBoxLoaiTS_LoaiTaiSan.list_loaitaisan;
                    if (Object.Equals(ListLoaiTaiSan, null))
                    {
                        XtraMessageBox.Show("Chưa chọn loại tài sản cần thống kê", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                    }
                    if (!(ListLoaiTaiSan.Count > 0))
                    {
                        XtraMessageBox.Show("Chưa chọn loại tài sản cần thống kê", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                    }
                    List<Guid> ListCoSo = CheckedComboBoxEditHelper.getCheckedValueArray(checkedComboBoxEdit_ChonCoSo);
                    if (!checkEdit_ChuaCoViTri.Checked)
//.........这里部分代码省略.........
开发者ID:quocdunginfo,项目名称:QuanLyTaiSan,代码行数:101,代码来源:frmReport.cs

示例11: repositoryItemButtonEdit1_ButtonClick


//.........这里部分代码省略.........
                if ((bool)listCondition[0].ShoulderACJoint || (bool)listCondition[0].ShoulderAdhesive || (bool)listCondition[0].ShoulderBursitis || (bool)listCondition[0].ShoulderImpingement || (bool)listCondition[0].ShoulderRotator)
                {
                    DetailReport_Shoulder.DataSource = listCondition;
                }
                else
                {
                    DetailReport_Shoulder.Visible = false;
                }

                if ((bool)listCondition[0].Wrist)
                {
                    DetailReport_Wrist.DataSource = listCondition;
                }
                else
                {
                    DetailReport_Wrist.Visible = false;
                }
            }
            else
            {
                DetailReport_Ankle.Visible = false;
                DetailReport_Elbow.Visible = false;
                DetailReport_Foot.Visible = false;
                DetailReport_Hip.Visible = false;
                DetailReport_Knee.Visible = false;
                DetailReport_Posture.Visible = false;
                DetailReport_Sacroiliac.Visible = false;
                DetailReport_Scoliosis.Visible = false;
                DetailReport_Shoulder.Visible = false;
                DetailReport_Wrist.Visible = false;
            }
            DetailReportBand cTBenhNhanVertebral = rptAll.Bands["DetailReport_Vertebral"] as DetailReportBand;
            if (listConditionVertebral.Count > 0)
            {
                cTBenhNhanVertebral.DataSource = listConditionVertebral;
            }
            else
            {
                cTBenhNhanVertebral.Visible = false;
            }

            DetailReportBand cTBenhNhanSnap = rptAll.Bands["DetailReport_Snap"] as DetailReportBand;
            if (listSnapShot.Count > 0)
            {
                cTBenhNhanSnap.DataSource = listSnapShot;
            }
            else
            {
                cTBenhNhanSnap.Visible = false;
            }

            DetailReportBand DetailReport_Excercises = rptAll.Bands["DetailReport_Excercises"] as DetailReportBand;
            if (listEx.Count > 0)
            {
                DetailReport_Excercises.DataSource = listEx;
            }
            else
            {
                DetailReport_Excercises.Visible = false;
            }

            if (cTBenhNhan.Comment.Trim().Length > 0)
            {
                rptAll.parComment.Value = cTBenhNhan.Comment.ToString();
                rptAll.parComment.Visible = false;
            }
            else
            {
                DetailReportBand DetailReport_Comment = rptAll.Bands["DetailReport_Comment"] as DetailReportBand;
                DetailReport_Comment.Visible = false;
                rptAll.parComment.Value = cTBenhNhan.Comment.ToString();
                rptAll.parComment.Visible = false;
            }

            string phone = ConfigurationManager.AppSettings["Phone"].ToString();
            string address = ConfigurationManager.AppSettings["Address"].ToString();
            rptAll.parPhone.Value = phone;
            rptAll.parPhone.Visible = false;
            rptAll.parDiaChi.Value = address;
            rptAll.parDiaChi.Visible = false;

            rptAll.parComment.Value = cTBenhNhan.Comment.ToString();
            rptAll.parComment.Visible = false;
            rptAll.parDate.Value = cTBenhNhan.NgayKham.ToString();
            rptAll.parDate.Visible = false;
            rptAll.parFileNumber.Value = benhNhan.ID.ToString();
            rptAll.parFileNumber.Visible = false;
            rptAll.parName.Value = benhNhan.TenBN.ToString();
            rptAll.parName.Visible = false;
            rptAll.parTreamentFor.Value = cTBenhNhan.TreatmentTimeFor.ToString();
            rptAll.parTreamentFor.Visible = false;
            rptAll.parTreamentTime.Value = cTBenhNhan.TreatmentTime.ToString();
            rptAll.parTreamentTime.Visible = false;
            rptAll.parTreamentTotal.Value = cTBenhNhan.TreatmentTimeFor.ToString();
            rptAll.parTreamentTotal.Visible = false;

            ReportPrintTool tool = new ReportPrintTool(rptAll);
            //tool.PreviewForm.Shown += new EventHandler(PreviewForm_Shown);
            tool.ShowPreviewDialog();
        }
开发者ID:toanvv8x,项目名称:AccApp,代码行数:101,代码来源:frmSystem_ListPatient_History.cs

示例12: Set_Export

        public void Set_Export()
        {
            try
            {
                if (string.IsNullOrWhiteSpace(txtNUM_COTI.Text))
                    throw new ArgumentException(_Message.MsgSelectCO);
                var split = deFEC_REGI.DateTime.ToLongDateString().Split(',');
                var oc = new xrQuote();
                var odoc = new BESVTC_COTI()
                {
                    COD_COTI = Convert.ToInt32(txtNUM_COTI.Text),
                    ALF_EJEC_COME = lueCOD_EJEC_COME.Text,
                    ALF_NOMB = beALF_NOMB.Text,
                    ALF_DIRE = txtALF_DIRE_FISC.Text,
                    ALF_PROY = lueCOD_PROY.Text,
                    NUM_SUBT = Convert.ToDecimal(txtNUM_SUBT.EditValue),
                    ALF_FECH_LARG = "Lima, " + split[1],
                    ALF_ATEN=txtALF_ATEN.Text
                };

                oc.bdsDocument.DataSource = odoc;
                var olst = (List<BESVTD_COTI>)gdvArticles.DataSource;
                var i = 1;
                olst.ForEach(item =>
                {
                    item.NUM_LINE = i;
                    i += 1;
                });
                oc.bdsDocumentLines.DataSource = olst;

                var SIMB = (BESVMC_MONE)lueCOD_MONE.GetSelectedDataRow();
                var tfs = (SIMB.ALF_MONE_SIMB == "USD") ? "{0:$ #,##0.00}" : "{0:c2}";

                oc.tlcNUM_PREC_UNIT.DataBindings["Text"].FormatString = tfs;
                oc.tlcNUM_IMPO.DataBindings["Text"].FormatString = tfs;
                oc.lblNUM_SUBT.DataBindings["Text"].FormatString = tfs;
                var ALF_COND_COME = mmoALF_COND_COME.Text;
                if (string.IsNullOrWhiteSpace(ALF_COND_COME))
                {
                    ALF_COND_COME = "1.- Los precios no incluyen IGV." + Environment.NewLine +
                                    "2.- Los precios están expresados en " + ((SIMB.ALF_MONE_SIMB == "USD") ? "Dolares Americanos." : "Nuevos Soles.") + Environment.NewLine +
                                    "3.- El pago debera ser en " + ((SIMB.ALF_MONE_SIMB == "USD") ? "Dolares Americanos." : "Nuevos Soles.") + Environment.NewLine +
                                    "4.- Entrega de la Mercancía: Dependiendo disponibilidad." + Environment.NewLine +
                                    "5.- Forma de pago: Crédito a 30 días entregado el producto." + Environment.NewLine +
                                    "6.- Vigencia de la cotización: 30 días naturales a partir de la fecha de esta cotización." + Environment.NewLine +
                                    "7.- Garantía de un año contra defectos de fabricación.";
                }
                oc.lblCOND_COME.Text = ALF_COND_COME;
                using (var printTool = new ReportPrintTool(oc))
                {
                    printTool.ShowPreviewDialog();
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message,
                                    _Message.MsgInsCaption,
                                    MessageBoxButtons.OK,
                                    MessageBoxIcon.Error);
            }
        }
开发者ID:isvelarder,项目名称:sispeper,代码行数:61,代码来源:xfQuote.cs

示例13: sbChiTietBaoCao_Click

        private void sbChiTietBaoCao_Click(object sender, EventArgs e)
        {
            BaoCaoTonKho bc = new BaoCaoTonKho();
            DataTable dt = gcDanhSachBaoCao.DataSource as DataTable;
            if (dt != null && dt.Rows.Count > 0)
            {
                bc.DanhSachSanPham = gcChiTietBaoCao.DataSource as DataTable;
                bc.ThoiGian = thoigianbaocao;
                XRBaoCaoTonKho BCTonKho = new XRBaoCaoTonKho(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);
            }
        }
开发者ID:TeamOOD,项目名称:QuanLyCuaHangBanLinhKienDienThoai,代码行数:26,代码来源:ucBaoCaoTonKho.cs

示例14: buttonPrint_Click

        private void buttonPrint_Click(object sender, EventArgs e)
        {
            bool resultValidateForm = validateForm();
            if (!resultValidateForm)
            {
                return;
            }
            fRMMain.showWaitingForm("กำลังทำการเปิดหน้าปริ้น");
            ReportPrintTool pt = new ReportPrintTool(new MiniReport());

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

            fRMMain.showWaitingForm("กำลังทำการเปิดหน้าปริ้น");
            // 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 });
        }
开发者ID:ruxchuk,项目名称:A-Team_Clem,代码行数:26,代码来源:UCAddEmployeeClem.cs

示例15: Set_Export

        public void Set_Export()
        {
            try
            {
                if (string.IsNullOrWhiteSpace(txtCOD_ORCO.Text))
                    throw new ArgumentException(_Message.MsgSelectOC);
                var oc = new xrPurchaseOrder();
                var odoc = new BEDocument()
                {
                    ALF_DOCU_REFE = txtALF_DOCU_REFE.Text.Trim(),
                    ALF_SOCI_NEGO = bteCOD_SOCI_NEGO.Text,
                    ALF_DIRE_ENTR = mmeALF_DIRE_ENTR.Text.Trim(),
                    ALF_COND_PAGO = lkeCOD_COND_PAGO.Text,
                    FEC_REGI = (DateTime?)dteFEC_REGI.EditValue,
                    ALF_COME = mmeALF_COME.Text,
                    NUM_SUBB_TOTA = Convert.ToDecimal(txtNUM_SUBB_TOTA.EditValue),
                    NUM_DESC = Convert.ToDecimal(txtNUM_DESC.EditValue),
                    NUM_IGVV = Convert.ToDecimal(txtNUM_IGVV.EditValue),
                    NUM_TOTA = Convert.ToDecimal(txtNUM_TOTA.EditValue)
                };

                oc.bdsDocument.DataSource = odoc;
                oc.bdsDocumentLines.DataSource = (List<BEDocumentLines>)gdvLines.DataSource;

                var SIMB = (BESVMC_MONE)lkeCOD_MONE.GetSelectedDataRow();
                var tfs = (SIMB.ALF_MONE_SIMB == "USD") ? "{0:USD 0.00}" : "{0:c2}";
                oc.lblNUM_SUBB_TOTA.DataBindings["Text"].FormatString = tfs;
                oc.lblNUM_DESC.DataBindings["Text"].FormatString = tfs;
                oc.lblNUM_IGVV.DataBindings["Text"].FormatString = tfs;
                oc.lblNUM_TOTA.DataBindings["Text"].FormatString = tfs;

                oc.tlcNUM_PREC_UNIT.DataBindings["Text"].FormatString = tfs;
                oc.tlcNUM_DESC.DataBindings["Text"].FormatString = tfs;
                oc.tlcNUM_PREC_DESC.DataBindings["Text"].FormatString = tfs;
                oc.tlcNUM_IMPO.DataBindings["Text"].FormatString = tfs;
                using (var printTool = new ReportPrintTool(oc))
                {
                    printTool.ShowPreviewDialog();
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message,
                                    _Message.MsgInsCaption,
                                    MessageBoxButtons.OK,
                                    MessageBoxIcon.Error);
            }
        }
开发者ID:isvelarder,项目名称:sispeper,代码行数:48,代码来源:xfPurchaseOrder.cs


注:本文中的ReportPrintTool.ShowPreviewDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。