Search code examples
jasper-reportsqr-code

QR Code integration in jasperReport


I am generating the JasperReport for my billing desktop application using JAVA but, I can't see the QR Code icon in the report in jasper 6.0.3 version; In the preview it is showing the QR Code, but not in the real report.

Please can anyone suggest the idea and QR Code JAR files?


Solution

  • Finally I found the answer for this question,

    We need to use the jar files to import the inbuilt jasperReport QR Code These are the jar files to generate the QR Code with Jasper report.

    enter image description here

    Also this jar files working for the jasper report without any exceptions.

    then we have to drag and drop the QR-Code from the jasper report Elements. and then we can define specified parameters using the xml.

           <componentElement>
                <reportElement x="547" y="-5" width="115" height="83" uuid="f5bf25f8-2967-4e4e-bfa2-7879a3275e1c"/>
                <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["Customer No: " + $F{CUST_NO}]]></jr:codeExpression>
                </jr:QRCode>
            </componentElement>
    

    Its working for me.