Barcodes, iReport and JasperReports plugin

Here is a small tutorial on how to get Barcodes printing correctly
It is assumed you have the JasperReports plug-in operational and you are familiar with iReport.

  1. Download and install

iReport 3.7.1
http://www.jaspersoft.com

All .jar files needed are in the iReport folder (no downloads necessary) (no ant, etc.)

A little note about 3.7.1;
You may have some font issues as 3.7.1 does not accept the default fonts used in 3.5.2.
What I did was highlight and selected the whole report and changed the font in whole.
Barcodes are native in 3.7.1 and you can pick them off of the palette.
You will be given a choice as to which generator to use, select BARBECUE.

  1. With iReport 3.7.1
    Go to the iReport directory

C:\Program Files\JasperSoft\iReport-3.7.1\ireport\modules\ext

That is where jasperreports-3.7.1.jar is located
Copy

jasperreports-3.7.1.jar

  1. Servoy Application Server Plug-in Directory
    Go to

C:\Program Files\Servoy\application_server\plugins\servoy_jasperreports

Paste

jasperreports-3.7.1.jar

  1. With IReport 3.7.1
    Go to the iReport directory

C:\Program Files\JasperSoft\iReport-3.7.1\ireport\modules\ext

That is where barbecue-1.5-beta1.jar is located
Copy

barbecue-1.5-beta1.jar

  1. Servoy Application Server Plug-in Directory
    Go to

C:\Program Files\Servoy\application_server\plugins\servoy_jasperreports

Paste

barbecue-1.5-beta1.jar

  1. Using notepad modify the following .JNLP file that comes with the JasperReports plug-in for Servoy
    LOCATED:

C:\Program Files\Servoy\application_server\plugins\servoy_jasperreports.jar.jnlp

MODIFY:

<jar href="/plugins/servoy_jasperreports/jasperreports-3.6.0.jar" download="eager"/> 

TO:

<jar href="/plugins/servoy_jasperreports/jasperreports-3.7.1.jar" download="eager"/> 

Allowing the new JasperReports .jar file to be read.

  1. Again, add a line to this file to include:

C:\Program Files\Servoy\application_server\plugins\servoy_jasperreports.jar.jnlp

ADD:

<jar href="/plugins/servoy_jasperreports/barbecue-1.5-beta1.jar" download="lazy" part="barbecue" version="1.5.1"/> 
			<package name="net.sourceforge.barbecue.*" part="barbecue" recursive="true"/>

Loading the new barbecue .jar file

Here is the whole .jnlp file;

<?xml version="1.0;" encoding="UTF-8;" ?>
<jnlp spec="1.0+" codebase="%%serverURL%%" href="/servoy-client/plugins/servoy_jasperreports.jar.jnlp">
	<information>
		<title>Servoy Client Plugins</title>
		<vendor>Servoy and Others</vendor>
	</information>
	<resources> 
		<jar href="/plugins/servoy_jasperreports.jar" download="eager"/>
		<jar href="/lib/commons-collections.jar" download="lazy" part="commons-collections" version="%%version%%"/>
			<package name="org.apache.commons.collections.*" part="commons-collections" recursive="true"/>
		<jar href="/lib/commons-logging.jar" download="lazy" part="commons-logging" version="%%version%%"/>
			<package name="org.apache.commons.logging.*" part="commons-logging" recursive="true"/>
		<jar href="/plugins/servoy_jasperreports/jasperreports-3.7.1.jar" download="eager"/>
		<jar href="/plugins/servoy_jasperreports/commons-beanutils-1.8.0.jar" download="lazy" part="commons-beanutils" version="1.8.0"/> 
			<package name="org.apache.commons.beanutils.*" part="commons-beanutils" recursive="true"/> 
		<jar href="/plugins/servoy_jasperreports/commons-digester-1.7.jar" download="lazy" part="commons-digester" version="1.7"/> 
			<package name="org.apache.commons.digester.*" part="commons-digester" recursive="true"/> 
		<jar href="/plugins/servoy_jasperreports/iText-2.1.0.jar" download="lazy" part="itext" version="2.1.0"/> 
			<package name="com.lowagie.*" part="itext" recursive="true"/> 
		<jar href="/plugins/servoy_jasperreports/jdt-compiler-3.1.1.jar" download="lazy" part="jdt-compiler" version="3.1.1"/> 
			<package name="org.eclipse.jdt.*" part="jdt-compiler" recursive="true"/> 
		<jar href="/plugins/servoy_jasperreports/barbecue-1.5-beta1.jar" download="lazy" part="barbecue" version="1.5.1"/> 
			<package name="net.sourceforge.barbecue.*" part="barbecue" recursive="true"/> 
		<jar href="/plugins/servoy_jasperreports/poi-3.2-FINAL-20081019.jar" download="lazy" part="poi" version="3.2"/> 
			<package name="org.apache.poi.*" part="poi" recursive="true"/> 
	</resources> 
	<component-desc></component-desc> 
</jnlp>

Hope this works for you too.

Hi,

Tnx for this HowTo! Wasn’t this one sufficient? Google Code Archive - Long-term storage for Google Code Project Hosting.

Paul

Hi Paul,
You are right! That is the wiki I followed and that is the plug-in I used.
I just wanted to get a real simple How-To out there.

Doug

Mind if I move the content of this post to the wiki of the Jasper Plugin, so people can find all the info related to the plugin there?

Paul

Good Idea.
Perhaps more of the posts related to the Jasper Plugin could be trolled, retrieved and edited and then placed in the wiki if still good information.