Search code examples
qr-codejasperserver

Jasperserver QRCode not visible in generated report


I Have created a jrmxl report using JasperStudio that just has a QRCode (Barcode4j)

<band height="125" splitType="Stretch">
    <componentElement>
        <reportElement x="144" y="50" width="100" height="30" uuid="bd83d632-c2b7-47a2-957a-7fa5483e6002"/>
        <jr:QRCode xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
            <jr:codeExpression><![CDATA["123456789"]]></jr:codeExpression>
        </jr:QRCode>
    </componentElement>
</band>

When i preview the report via Jasper Studio, it shows the QR Code. But when the report is published under JasperServer the QRCode does not appear in the report.There are no errors in the server.log file

According to this link Barcode4J QR Code need to use Zxing Core jar.

I have tried dropping the core.jar file in the WEB-INF/lib as per enter link description here.

Can confirm that the barcode4j-2.1.jar exists in the WEB-INF/lib.

Any suggestions?

Thanks


Solution

  • Add the following property to WEB-INF/classes/jasperreports.properties file:

    net.sf.jasperreports.components.barcode4j.image.producer=image