コード例 #1
0
 private void btnIssueDetailByFacilityPrint_Click(object sender, EventArgs e)
 {
     if (printIssueDetailByFacility.PrintingSystem != null)
     {
         report.PrintDialog();
     }
 }
コード例 #2
0
ファイル: frmstatventlevel.cs プロジェクト: iamwsx05/report
 public override void Preview()
 {
     if (xr != null && xr.DataSource != null)
     {
         xr.PrintDialog();
     }
 }
コード例 #3
0
 /// <summary>
 /// Preview
 /// </summary>
 public override void Preview()
 {
     //uiHelper.Print(this.gcData);
     if (xr != null && xr.DataSource != null)
     {
         xr.PrintDialog();
     }
 }
コード例 #4
0
 private void btnPrint_Click(object sender, EventArgs e)
 {
     if (printControl1.PrintingSystem != null)
     {
         XtraReport   report = GetReport();
         MemoryStream stream = new MemoryStream();
         report.ExportToPdf(stream);
         report.PrintDialog();
     }
 }
コード例 #5
0
ファイル: wfPrint.cs プロジェクト: jlhfut/SmokingDetect
        private void bbiPrint_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            XtraReport report = ucpdf.GetPrintDocument();

            if (report.PrintDialog() == DialogResult.OK)
            {
                // report.Print();
                XtraMessageBox.Show(Program.infoResource.GetLocalizedString(language.InfoId.OpearteSuccess));
            }
        }
        protected override void PrintReport(IReportDataV2 reportData)
        {
            XtraReport      report        = ReportDataProvider.ReportsStorage.LoadReport(reportData);
            ReportsModuleV2 reportsModule = ReportsModuleV2.FindReportsModule(Application.Modules);

            if (reportsModule != null && reportsModule.ReportsDataSourceHelper != null)
            {
                reportsModule.ReportsDataSourceHelper.SetupBeforePrint(report);
                report.PrintDialog();
            }
        }
コード例 #7
0
        /// <summary>
        /// Handles the Click event of the btnPrint control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
        private void btnPrint_Click(object sender, EventArgs e)
        {
            DataRow        dr      = gridViewTransaction.GetFocusedDataRow();
            PickList       pl      = new PickList();
            PickListDetail pld     = new PickListDetail();
            int            orderId = Convert.ToInt32(dr["OrderID"]);
            DataView       dv      = pl.GetPickedOrderDetailForOrder(_stvLogIdChosen.Value, false);

            XtraReport xtraReport = RePrintSTV(dv, orderId, pl, _stvLogIdChosen, false, false);

            if (xtraReport != null)
            {
                xtraReport.PrintDialog();
            }
        }
コード例 #8
0
ファイル: XCOMP_Rpt007_frm.cs プロジェクト: arocajorge/ERPFJ
 void ucactF_Menu_Reportes1_event_btnImprimir_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         if (Rpt != null)
         {
             Rpt.PrintDialog();
         }
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
         MessageBox.Show(ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #9
0
 private void btnPrint_Click(object sender, EventArgs e)
 {
     if (printControl1.PrintingSystem != null)
     {
         XtraReport   report = GetReport();
         MemoryStream stream = new MemoryStream();
         report.ExportToPdf(stream);
         if (report.PrintDialog() == DialogResult.OK)
         {
             HCMIS.Core.Distribution.Services.PrintLogService.SavePrintLogNoWait(stream,
                                                                                 "Archive_" +
                                                                                 documentType.EditValue.ToString(),
                                                                                 true,
                                                                                 Convert.ToInt32(txtDocumentNumber.Text),
                                                                                 CurrentContext.UserId,
                                                                                 BLL.DateTimeHelper.ServerDateTime);
         }
     }
 }
コード例 #10
0
        public void Yazdirr(Nasil NasilAcsin)
        {
            //Rapor.DataAdapter = ds;
            //ds = new DataSet();
            Rapor.DataSource = ds;


            switch (NasilAcsin)
            {
            case Nasil.Goster:
                Rapor.ShowPreviewDialog();
                break;

            case Nasil.Yazdir:
                Rapor.Print();
                break;

            case Nasil.YazdirmaDiyalogu:
                Rapor.PrintDialog();
                break;
            }
        }
コード例 #11
0
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            int opcionSeleccionada = lbcOpciones.SelectedIndex;

            switch (opcionSeleccionada)
            {
            case 0:     //Vista preliminar
                //using (ReportPrintTool printTool = new ReportPrintTool(Reporte))
                //{
                //    // Invoke the Print Preview form modally,
                //    // and load the report document into it.
                //    printTool.ShowPreviewDialog();
                //}
                XtraReportCustom = new XtraReport {
                    DataSource = DataSetRp
                };
                XtraReportCustom.LoadLayout(FileName);

                if ((XtraReportCustom.Parameters["TotalDocumentoLetra"]) != null)
                {
                    XtraReportCustom.Parameters["TotalDocumentoLetra"].Value = ImporteDocumentoLetras;
                }

                XtraReportCustom.RequestParameters = false;

                //XtraReportCustom.ShowPreviewDialog();

                ReportPrintToolCustom = new ReportPrintTool(XtraReportCustom)
                {
                    AutoShowParametersPanel = false
                };
                ReportPrintToolCustom.ShowPreviewDialog();

                //Reporte.CreateDocument();
                //Reporte.ShowPreviewDialog();
                break;

            case 1:     //Impresora
                XtraReportCustom = new XtraReport {
                    DataSource = DataSetRp
                };
                XtraReportCustom.LoadLayout(FileName);
                XtraReportCustom.ShowPrintMarginsWarning = false;
                XtraReportCustom.PrintDialog();
                break;

            case 2:     //Archivo PDF
                //saveFileDialogPdf.Filter = @"Archivo Pdf (*.pdf)|*.pdf|Todos los archivos (*.*)|*.*";
                //saveFileDialogPdf.FilterIndex = 1;
                //saveFileDialogPdf.RestoreDirectory = true;
                //saveFileDialogPdf.FileName = "reporte.pdf";
                //if (saveFileDialogPdf.ShowDialog() == DialogResult.OK)
                //{
                //    Reporte.Prepare();
                //    // create export instance
                //    PDFExport export = new PDFExport();
                //    // export the report
                //    Reporte.Export(export, saveFileDialogPdf.FileName);
                //    // free resources used by report
                //    Reporte.Dispose();
                //}
                break;
            }
        }
コード例 #12
0
 private void btnPrint_Click(object sender, EventArgs e)
 {
     report.PrintDialog();
 }
コード例 #13
0
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            int        opcionSeleccionada = lbcOpciones.SelectedIndex;
            XtraReport report;

            switch (opcionSeleccionada)
            {
            case 0:     //Vista preliminar
                report = new XtraReport {
                    DataSource = DataSource
                };
                if (!string.IsNullOrEmpty(NameReport))
                {
                    report.Name = NameReport;
                }

                report.LoadLayout(FileName);

                //Asignar parametros
                if (report.Parameters != null && Parameters != null)
                {
                    for (var i = 0; i < report.Parameters.Count; i++)
                    {
                        report.Parameters[i].Value = Parameters[i];
                    }
                }

                report.RequestParameters = false;
                ReportPrintToolCustom    = new ReportPrintTool(report)
                {
                    AutoShowParametersPanel = false
                };
                ReportPrintToolCustom.ShowPreviewDialog();
                break;

            case 1:     //Impresora

                report = new XtraReport {
                    DataSource = DataSource
                };
                if (!string.IsNullOrEmpty(NameReport))
                {
                    report.Name = NameReport;
                }

                //Asignar parametros
                if (report.Parameters != null && Parameters != null)
                {
                    for (var i = 0; i < report.Parameters.Count; i++)
                    {
                        report.Parameters[i].Value = Parameters[i];
                    }
                }


                report.LoadLayout(FileName);
                report.ShowPrintMarginsWarning = false;
                report.PrintDialog();
                break;

            case 2:     //Archivo PDF
                break;
            }
        }