เอาต์พุตบาร์โค้ดที่เข้ากับเวิร์กโฟลว์ JasperReports ของคุณ

Aspose.BarCode for JasperReports เป็นส่วนขยาย Java ล้วนที่ดีพลอยเป็น JAR เดียว ช่วยให้นักสร้างรายงานวางบาร์โค้ดลงในรายงานได้โดยไม่ต้องสร้างบริการเรนเดอร์แยกต่างหาก เหมาะสำหรับใบแจ้งหนี้ ฉลากจัดส่ง ตั๋ว และฟอร์มภายในที่ต้องการขนาดและความคมชัดของบาร์โค้ด

  • ดีพลอยเป็น JAR เดียว

    ดีพลอยโดยคัดลอก JAR ไฟล์เดียวไปยังตำแหน่งที่ถูกต้องสำหรับ JasperReports หรือ JasperServer ทำให้การตั้งค่าง่ายในหลายสภาพแวดล้อม

  • สร้างบาร์โค้ดระหว่างการเรนเดอร์รายงาน

    ผูกค่าบาร์โค้ดกับฟิลด์และพารามิเตอร์ใน dataset ของรายงาน แล้วบาร์โค้ดจะถูกเรนเดอร์เป็นส่วนหนึ่งของเวิร์กโฟลว์ export และการพิมพ์ตามปกติ

  • ฟอร์แมตเอาต์พุตที่เหมาะกับงานพิมพ์

    เรนเดอร์ภาพแรสเตอร์สำหรับการ export ทั่วไป หรือใช้ SVG และ EMF เมื่อจำเป็นต้องสเกลให้คมชัดสำหรับเลย์เอาต์งานพิมพ์

  • ครอบคลุมสัญลักษณ์อย่างกว้าง

    ใช้ฟอร์แมต 1D และ 2D ที่นิยมในสแตกการทำรายงานเดียวกัน รวมถึง QR Code, Data Matrix, PDF417 และ Code 128

มาตรฐาน? รองรับครบ

Aspose.BarCode for JasperReports รองรับไฟล์ภาพหลัก ๆ ทุกประเภท รวมถึงฟอร์แมตเวกเตอร์อย่าง SVG และ EMF รวมถึง PDF ใช้ API ของเราเพื่อรู้จำ files จากสแกนเนอร์หรือกล้องได้อย่างง่ายดาย นี่คือสัญลักษณ์บาร์โค้ดที่รองรับทั้งหมด รวมถึงประเภท 1D, 2D, ไปรษณีย์ และแบบผสม (composite) แต่ละแบบสามารถสร้างและรู้จำได้บนทุกแพลตฟอร์มที่รองรับ

เมทริกซ์ / โค้ด 2D

  • QR Code, MicroQR, rMQR
  • Data Matrix, Industrial Data Matrix (DPM)
  • Aztec
  • Han Xin
  • MaxiCode
  • DotCode

เชิงเส้น / โค้ด 1D

  • UPCA, UPCE
  • EAN13, EAN14, EAN8
  • Code 128
  • DataBar
  • ITF
  • Postal

อุตสาหกรรมและโค้ดผสม

  • GS1
  • ECI
  • Composite barcodes
  • HIBC
  • SwissQR
  • Royal Mailmark

ข้อกำหนดระบบและตัวเลือกการดีพลอย

Aspose.BarCode for JasperReports ทำงานบน Java SE (J2SE) 5.0 ขึ้นไป และผสานกับ JasperReports และ JasperServer เอกสารผลิตภัณฑ์ระบุความเข้ากันได้กับ JasperReports 2.0+ และ 3.0+ คุณสามารถใช้ Maven จัดการ dependency หรือดาวน์โหลดแพ็กเกจ JAR แล้วดีพลอยไปยังการติดตั้ง JasperReports หรือ JasperServer ได้

Microsoft Windows
Linux
macOS

ตัวอย่างโค้ด: ปรับสไตล์บาร์โค้ดใน JasperReports ด้วยพารามิเตอร์

กำหนดเนื้อหาบาร์โค้ดและคุณสมบัติด้านภาพเป็นกลุ่มที่ใช้ซ้ำได้ ส่งค่าผ่านพารามิเตอร์รายงาน คอมไพล์เทมเพลต JRXML และ export เป็น PDF ที่เรียบร้อย — ทั้งหมดนี้ในเวิร์กโฟลว์แบบ code-first ที่สะอาดด้วย Aspose.BarCode for JasperReports

// Input JRXML template path + output PDF path
String patternFilePath = path + "builder-params1.jrxml";
String reportFilePath   = out  + "builder-params1.pdf";

// Create ReportBuilder (main entry point for assembling the report)
ReportBuilder reportBuilder = new ReportBuilder();

// Define a reusable barcode attributes group (styling + barcode content settings)
BarcodeAttributesGroup attributesGroup = new BarcodeAttributesGroup("barcode-attributes1");
attributesGroup.addBarcodeAttribute(BarcodeAttributeName.CodeText, "EAN14");
attributesGroup.addBarcodeAttribute(BarcodeAttributeName.EncodeType, EncodeTypes.EAN_14);
attributesGroup.addBarcodeAttribute(BarcodeAttributeName.ForeColor, new Color(85, 107, 47));
attributesGroup.addBarcodeAttribute(BarcodeAttributeName.BackColor, new Color(245, 245, 220));
attributesGroup.addBarcodeAttribute(BarcodeAttributeName.BorderColor, new Color(39, 64, 139));
attributesGroup.addBarcodeAttribute(BarcodeAttributeName.BorderVisible, true);
attributesGroup.addBarcodeAttribute(BarcodeAttributeName.BorderWidth, 2);
attributesGroup.addBarcodeAttribute(BarcodeAttributeName.BorderDashStyle, DashStyle.Solid);

// Attach the barcode attributes group + provide report parameters used by the template
reportBuilder.addBarcodeAttributesGroup(attributesGroup);
reportBuilder.addReportParameter("barcode-title1", "Barcode for EAN14");
reportBuilder.addReportParameter("report-title", "Example of ReportBuilder with customer's parameters");
reportBuilder.addReportParameter("author", "Report prepared By Alex");
reportBuilder.setPatternFilePath(patternFilePath);

// Compile the template and get JasperPrint (ready-to-export report instance)
JasperPrint jasperPrint = reportBuilder.compileReport().getJasperPrint();

// Configure PDF exporter (input JasperPrint + PDF settings)
JRPdfExporter exporter = new JRPdfExporter();
ExporterInput exporterInput = new SimpleExporterInput(jasperPrint);
exporter.setExporterInput(exporterInput);
PdfExporterConfiguration pdfExporterConfiguration = new SimplePdfExporterConfiguration();
exporter.setConfiguration(pdfExporterConfiguration);

// Prepare output stream and run export to PDF file
File saveToFile = new File(reportFilePath);
OutputStream outputStream = new FileOutputStream(saveToFile);
SimpleOutputStreamExporterOutput outputStreamExporterOutput = new SimpleOutputStreamExporterOutput(outputStream);
exporter.setExporterOutput(outputStreamExporterOutput);

exporter.exportReport();

บาร์โค้ดในรายงานสำหรับงานวางบิล โลจิสติกส์ และงานปฏิบัติการ

JasperReports มักถูกใช้เพื่อสร้างเอกสารที่ไหลผ่านระบบปฏิบัติการต่าง ๆ การเพิ่มบาร์โค้ดทำให้เอกสารเหล่านั้นสแกนได้และลดการกรอกข้อมูลด้วยมือ

  • ใบแจ้งหนี้และสเตทเมนต์: เข้ารหัส document ID และข้อมูลอ้างอิงลูกค้า
  • ฉลากจัดส่งและใบแพ็กของ: ใส่รหัสติดตามและ internal routing ID
  • ตั๋วและบัตรผ่าน: สร้างบาร์โค้ด 2D สำหรับ payload ที่กะทัดรัด
  • รายงานทรัพย์สินและสต็อก: เพิ่มตัวระบุที่สแกนได้สำหรับเวิร์กโฟลว์กระทบยอด
  • รูปภาพพร้อมใช้งานสำหรับ export: PNG, JPEG, TIFF, BMP, GIF, EXIF รวมถึง SVG และ EMF

ออกแบบมาสำหรับทีม JasperReports

Feature icon

ส่วนขยาย Java ล้วน จัดส่งเป็น JAR เดียว

Feature icon

ใช้ฟิลด์และพารามิเตอร์ JasperReports เพื่อขับเคลื่อนค่าบาร์โค้ด

Feature icon

ส่งออกเป็นแรสเตอร์ทั่วไปและเวกเตอร์สำหรับงานพิมพ์

Feature icon

ทำงานกับการดีพลอย JasperReports และ JasperServer

Feature icon

สัญลักษณ์บาร์โค้ดมากกว่า 80 แบบ ครอบคลุม 1D, 2D และตระกูลไปรษณีย์

Feature icon

ตัวอย่างและคู่มือสำหรับการผสานและการตั้งค่ารายงาน