开发者

Jasper Reports - Generating PDF 417 barcodes using Barcode4j

开发者 https://www.devze.com 2022-12-10 13:32 出处:网络
We are currently using Jasper Reports to generate PDF 417 barcodes using Barcode4j. We are using Barcode component for the same. If we set CodeExpression property to \"CASE-SEPARATOR%$DEFKCNBSMEDPB%$

We are currently using Jasper Reports to generate PDF 417 barcodes using Barcode4j.

We are using Barcode component for the same. If we set CodeExpression property to "CASE-SEPARATOR%$DEFKCNBSMEDPB%$CASEGPE0000115%$LOBDBAN%$CUSTG00012345" it throws following runtime exception.

Error filling print... net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expr开发者_如何学Pythonession :      Source text : "CASE-SEPARATOR%$DEFKCNBSMEDPB%$CASEGPE0000115%$LOBDBAN%$CUSTG00012345" 
net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression :      Source text : "CASE-SEPARATOR%$DEFKCNBSMEDPB%$CASEGPE0000115%$LOBDBAN%$CUSTG00012345" 

at net.sf.jasperreports.components.barcode4j.BarcodeEvaluator.evaluateExpression(BarcodeEvaluator.java:72)      at net.sf.jasperreports.components.barcode4j.BarcodeEvaluator.evaluateBaseBarcode(BarcodeEvaluator.java:53)      at net.sf.jasperreports.components.barcode4j.BarcodeEvaluator.evaluatePDF417(BarcodeEvaluator.java:145)      at net.sf.jasperreports.components.barcode4j.AbstractBarcodeEvaluator.visitPDF417(AbstractBarcodeEvaluator.java:424) 

If we remove $ character from above code expression value it works fine. Has anyone got idea how to generate PDF417 barcodes having $ characted in Message using Jasper reports/Barcode 4J. Thanks


We are able to generate barcode in png format by directly using Barcode4J API. It seems that there is a bug in jasper reports which does not allow $ character in barcode messgae while generating PDF 417 barcode.

0

精彩评论

暂无评论...
验证码 换一张
取 消