Hi guys
I have a lot of reports made in Jasper Reports (iReport), but now I have necessity to add a barcode in every report. With advanced plugin I have a problem (as explained in an other topic ). Also I have notice that barbecue is a beta plugin (barbecue-1.5-beta1.jar) made in 2007. I ask, now it’s still used this plugin? Why there is not a final release of its?
So I wanna ask you if there are others solutions to print barcodes (I’ve read about Velocity but this means that add another program for reports…) or Jasper Plugin is the right way.
I have been using the barcode from IT2BE with success - but not from within an iReport - from a Servoy form. Would that work for your case?
Have a look here:
There’s no issue with having both JasperReports and VelocityReport in your plugins. I know quite a few solutions in production that are using both, depending on the type of report and data they are producing. In any case, there’s no harm having both in your plugins folder.
VelocityReport can produce bar codes that you can use as a simple image, in the end it’s just a URL, so you can embed it into any form, report or html page, so I bet you could pass the URL parameter produced by plugins.VelocityReport.getBarcode() as parameter to Jasper…
I hope this will give you the occasion to give VelocityReport a better try.
You’ll see that it’s easy to work with and it’s a Jasper killer for some reports, especially those with flexible layouts…
ptalbot:
There’s no issue with having both JasperReports and VelocityReport in your plugins. I know quite a few solutions in production that are using both, depending on the type of report and data they are producing. In any case, there’s no harm having both in your plugins folder.
VelocityReport can produce bar codes that you can use as a simple image, in the end it’s just a URL, so you can embed it into any form, report or html page, so I bet you could pass the URL parameter produced by plugins.VelocityReport.getBarcode() as parameter to Jasper…
Hello
How can I pass the URL produced by velocity.getBarcode() as parameter to Jasper?
Which is the correct class of the parameter? and in Ireport is necessary to put in form an image object? which expression class?
Thank you very much
Regards
Roberto
VelocityReport.getBarCode() returns a BarcodeWrapper object. This object’s toString() method will give you a full tag suitable to use in HTML_AREA or in VelocityReport’s templates.
But I’ve just added a getURL() method (in v2.0.29, so update) that will allow you to retrieve the pure URL of that barcode, this URL is a String.
I tried but didn’t work.
I set in Ireport the parameter and the image object class java.lang.String
I get the URL with “barcode.getURL()” but didn’t work.
I tried with:
var v_url = barcode.getURL();
var v_bytes = plugins.http.getMediaData( v_url );
var v_img = new Packages.java.io.ByteArrayInputStream( v_bytes );
v_img = Packages.javax.imageio.ImageIO.read( v_img );
and pass the variable “v_img” to a param defined java.awt.Image ( the image object class is java.awt.Image ) and works.
I used Ireport 4.0.0 and plugin 3.3.0
Thanks for support
Bye
Roberto
I think that is a plugin problem.
I put the barcode URL in a string parameter ( default value ) and set the image object class to java.lang.String, the preview launched from Ireport works.
I am attracted by the title of this thread for I am having similar problems like how to use bar code in jasper reports in java. I visited many barcode tools sites but got no ideas. The discussions here are so insightful, offering me much hints.
Moderator:Your message doesn’t match your link references. In fact the way this post was constructed is very much considered spam. All the extra links and colors are now removed. Please stay on topic.