Esempio n. 1
0
        private void CrearPDF(string fileNamepdf)
        {
            int folio = Convert.ToInt32(txtFolio.Text);
            rpt_InventarioCiego_Enviado rpt = new rpt_InventarioCiego_Enviado(folio);

            ((SqlDataSource)rpt.DataSource).ConfigureDataConnection += Form1_ConfigureDataConnection;
            ReportPrintTool  print      = new ReportPrintTool(rpt);
            PdfExportOptions pdfOptions = rpt.ExportOptions.Pdf;

            pdfOptions.PageRange = "1-1000";

            // Specify the quality of exported images.
            pdfOptions.ConvertImagesToJpeg = false;
            pdfOptions.ImageQuality        = PdfJpegImageQuality.Medium;

            // Specify the PDF/A-compatibility.
            pdfOptions.PdfACompatibility = PdfACompatibility.PdfA3b;

            // The following options are not compatible with PDF/A.
            // The use of these options will result in errors on PDF validation.
            //pdfOptions.NeverEmbeddedFonts = "Tahoma;Courier New";
            //pdfOptions.ShowPrintDialogOnOpen = true;

            // If required, you can specify the security and signature options.
            //pdfOptions.PasswordSecurityOptions
            //pdfOptions.SignatureOptions

            // If required, specify necessary metadata and attachments
            // (e.g., to produce a ZUGFeRD-compatible PDF).
            //pdfOptions.AdditionalMetadata
            //pdfOptions.Attachments

            // Specify the document options.
            pdfOptions.DocumentOptions.Application = "Reporte Inventario Ciego";
            pdfOptions.DocumentOptions.Author      = "NexusSoft";
            pdfOptions.DocumentOptions.Keywords    = "SES_Inventarios, Reporte, PDF";
            pdfOptions.DocumentOptions.Producer    = Environment.UserName.ToString();
            pdfOptions.DocumentOptions.Subject     = "Documento Inventario";
            pdfOptions.DocumentOptions.Title       = "Reporte Inventario Ciego";

            // Checks the validity of PDF export options
            // and return a list of any detected inconsistencies.
            IList <string> result = pdfOptions.Validate();

            if (result.Count > 0)
            {
                Console.WriteLine(String.Join(Environment.NewLine, result));
            }
            else
            {
                rpt.ExportToPdf(fileNamepdf, pdfOptions);
            }
        }
Esempio n. 2
0
 private void Imprimir()
 {
     if (txtFolio.Text != string.Empty && cboSucursales.EditValue != null)
     {
         long    folio    = Convert.ToInt32(txtFolio.Text);
         decimal Sucursal = Convert.ToInt32(cboSucursales.EditValue.ToString());
         rpt_InventarioCiego_Enviado rpt = new rpt_InventarioCiego_Enviado(folio);
         ((SqlDataSource)rpt.DataSource).ConfigureDataConnection += Form1_ConfigureDataConnection;
         ReportPrintTool print = new ReportPrintTool(rpt);
         rpt.ShowPreviewDialog();
     }
     else
     {
         XtraMessageBox.Show("Falta seleccionar una Entrada");
     }
 }
Esempio n. 3
0
 private void btnHojaChecado_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (txtFolio.Text != string.Empty && cboSucursales.EditValue != null)
     {
         long    folio    = Convert.ToInt32(txtFolio.Text);
         decimal Sucursal = Convert.ToInt32(cboSucursales.EditValue.ToString());
         rpt_InventarioCiego_Enviado rpt = new rpt_InventarioCiego_Enviado(folio);
         ((SqlDataSource)rpt.DataSource).ConfigureDataConnection += Form1_ConfigureDataConnection;
         ReportPrintTool print = new ReportPrintTool(rpt);
         rpt.ShowPreviewDialog();
     }
     else
     {
         XtraMessageBox.Show("Falta seleccionar un folio de inventario");
     }
 }