我在jrxml文件中生成条形码时遇到错误,该文件将转换为jasper文件。
我正在使用jaspersoft studio来实现条形码。
但在实施时我面临以下错误。
net.sf.jasperreports.engine.JRException:遇到错误 编译
报告表达式类文件:
com.keepdynamic.barcode.generator.jasperreports.BarcodeRenderer cannot be resolved to a type
value = new com.keepdynamic.barcode.generator.jasperreports.BarcodeRenderer(
com.keepdynamic.barcode.generator.jasperreports.BarcodeFactory.createLinear(
8,"((net.sf.jasperreports.engine.JRRenderable)field_barcode.getValue())"));
//$JR_EXPR_ID=152$
com.keepdynamic.barcode.generator.jasperreports.BarcodeFactory cannot
be resolved to a type
value = new com.keepdynamic.barcode.generator.jasperreports.BarcodeRenderer(
com.keepdynamic.barcode.generator.jasperreports.BarcodeFactory.createLinear(
8,"((net.sf.jasperreports.engine.JRRenderable)field_barcode.getValue())"));
//$JR_EXPR_ID=152$
com.keepdynamic.barcode.generator.jasperreports.BarcodeRenderer cannot
be resolved to a type
value = new com.keepdynamic.barcode.generator.jasperreports.BarcodeRenderer(
com.keepdynamic.barcode.generator.jasperreports.BarcodeFactory.createLinear(
8,"((net.sf.jasperreports.engine.JRRenderable)field_barcode.getOldValue())")); //$JR_EXPR_ID=152$
<------------------------------------------------------------->
com.keepdynamic.barcode.generator.jasperreports.BarcodeFactory cannot be resolved to a type
value = new com.keepdynamic.barcode.generator.jasperreports.BarcodeRenderer(
com.keepdynamic.barcode.generator.jasperreports.BarcodeFactory.createLinear(
8,"((net.sf.jasperreports.engine.JRRenderable)field_barcode.getOldValue())")); //$JR_EXPR_ID=152$
com.keepdynamic.barcode.generator.jasperreports.BarcodeRenderer cannot
be resolved to a type value = new com.keepdynamic.barcode.generator.jasperreports.BarcodeRenderer(
com.keepdynamic.barcode.generator.jasperreports.BarcodeFactory.createLinear(
8,"((net.sf.jasperreports.engine.JRRenderable)field_barcode.getValue())")); //$JR_EXPR_ID=152$
com.keepdynamic.barcode.generator.jasperreports.BarcodeFactory cannot
be resolved to a type
value = new com.keepdynamic.barcode.generator.jasperreports.BarcodeRenderer(
com.keepdynamic.barcode.generator.jasperreports.BarcodeFactory.createLinear(
8,"((net.sf.jasperreports.engine.JRRenderable)field_barcode.getValue())")); //$JR_EXPR_ID=152$
<------------------------------------------------------------>
errors
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:215)
at net.sf.jasperreports.eclipse.builder.JasperReportCompiler.compileReport(JasperReportCompiler.java:195)
at net.sf.jasperreports.eclipse.builder.JasperReportCompiler.compileReport(JasperReportCompiler.java:91)
at net.sf.jasperreports.eclipse.builder.JasperReportsBuilder.compileJRXML(JasperReportsBuilder.java:211)
at com.jaspersoft.studio.editor.action.CompileAction.actionCompile(CompileAction.java:176)
at com.jaspersoft.studio.editor.action.CompileAction$3.run(CompileAction.java:132)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
答案 0 :(得分:1)
您需要将KeepDynamic barcode.jar
添加到类路径
要下载jar访问their page,您可以考虑其他条形码库已经包含在jasper发行版中barbecue和barcode4j,这些也可以直接在IDE中使用