Jump to content

it.businesslogic.ireport.barcode.BcImage


Exie

Recommended Posts

Hiya Folks,

This may take a few of you waaayyy back. But many moons ago I embeded JasperReport 2.0.2 in an application. We had about 4 JRXML's are assembled to go with the app and its been working great ever since.

 

However the time has come to overhaul the app and I'd like to update to JasperReports 4.1.0 engine. So I've selected all the JAR's from the current release and it all compiled up ok. But trying to render my document thew one of these:

Caused by: java.lang.NoClassDefFoundError: it/businesslogic/ireport/barcode/BcImage

 

A Quick inspection shows the old build had "ireport.jar" which seems to match up with an old v2.0.5 copy of iReport used at the time to build the templates.

 

I presume this has since been replaced with Barcode4J. My question is, whats the best way to bring my app up to date ?

 

Do I fish out the JRXML's and re-compile them with iReport 4.1 ?

Do I simply include the old iReport.jar in my libraries ?

 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Hi Exie,

 

the barcode support of iR 3.0 has been deprecated, since JasperReports provides a new more advanced native component to render the barcodes (still based on Babecue, or optionally it is possible to use Barcode4J).

 

Anyway you should have the ability to transform an old image object to print a barcode in a new barcode by rightclicking the object and selecting the proper menu item (something like "convert to Barcode component" or something like that).

 

Giulio

Link to comment
Share on other sites

Thanks. Thats exactly what I did. Only had 4 JRXML's to do so it wasnt too bad. Basically it swapped this element as below.

 

By swapping the barcode "image" to the baebecue element they all run fine first time.

 

Thanks.

Tim.

Code:
was this:                <image  scaleImage="RetainShape" vAlign="Top" hAlign="Left" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >                    <reportElement                        mode="Opaque"                        x="438"                        y="1"                        width="126"                        height="38"                        forecolor="#000000"                        backcolor="#FFFFFF"                        key="barcode-1"/>                    <box></box>                    <graphicElement stretchType="NoStretch" fill="Solid" />                    <imageExpression class="java.awt.Image"><![CDATA[it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(9,$F{po number},false,false,null,0,0)]]></imageExpression>                </image>now This:            <componentElement>                <reportElement x="438" y="1" width="126" height="38"/>                <jr:barbecue xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" type="Code39" drawText="false" checksumRequired="false" barHeight="60">                    <jr:codeExpression><![CDATA[$F{po number}]]></jr:codeExpression>                </jr:barbecue>            </componentElement>
Link to comment
Share on other sites

  • 5 years 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...