Jump to content

How i can generate BARCODE (3*8 sheet)?


shiv

Recommended Posts

 Hi,

I wanted to generate BARCODE  Sticker (3*8) .How i can do that ? I found this method:-

How to generate barcodes in Jasper Reports using Java Barcode?

Create a new report. 
Add barcode.jar to report classpath. 
Select menu "Tools", "Options", then select "classpath" tab. add barcode.jar to the classpath 
Drag an image item in Palette to report 
Click "Cancel" button, in "Select an image file" window. 
Select the image item, and edit it's properties. 
Set property "Expression Class" to "net.sf.jasperreports.engine.JRRenderable"; 
Set property "Image Expression" to "new com.onbarcode.barcode.jasper.JasperRenderer( com.onbarcode.barcode.jasper.BarcodeJasperFactory.createDataMatrix("123456789", 0, 0, 3))"; 
You can preview the data matrix barcode in your report. 

 

DO i need database to generate Barcode? I use this method but i am getting error. Can you send me some .jrxml file?

Any help would be great!!

 Error:---Version:0.9 StartHTML:-1 EndHTML:-1 StartFragment:0000000111 EndFragment:0000002555 

 Compiling to file... M:basisbbjdemosReportsreport5.jasper Errors compiling M:basisbbjdemosReportsreport5.jasper! Compilation exceptions: com.jaspersoft.ireport.designer.compiler.ErrorsCollector@1b01412

net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, calculator_report5_1272355431919_135512: 149: unable to resolve class com.onbarcode.barcode.jasper.JasperRenderer 
 @ line 149, column 64.calculator_report5_1272355431919_135512: 197: unable to resolve class com.onbarcode.barcode.jasper.JasperRenderer 
 @ line 197, column 64.calculator_report5_1272355431919_135512: 245: unable to resolve class com.onbarcode.barcode.jasper.JasperRenderer 
 @ line 245, column 64.
3 errors

    at net.sf.jasperreports.compilers.JRGroovyCompiler.compileUnits(JRGroovyCompiler.java:88)
    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:188)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:215)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:131)
    at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:510)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Compilation running time: 683!


 

 



Post Edited by shiv at 04/27/2010 08:05
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

can you be more clear about the error you have?

if the problem is related to a DB connection you haven't... try to use Empty Data Source.

 

 

 

____________________________________
if it works... give me KARMA points please!    : ) 

Link to comment
Share on other sites

  • 2 years later...
  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...