Create report with barcode

-1

I need to create a report in Jasper Studio with a barcode but I can not read the barcode that the report is generating, my question is, which barcode standard should I use, and how should I set it up in Jasper Studio so that the bar code reading gun can read it.

  • I'm currently using Jasper Studio 5.6.0 (The tool that I'm using allows only up to version 5.x of Jasper Studio)
asked by anonymous 01.08.2017 / 18:49

1 answer

1

I found a solution here that worked in this online barcode reader .

<!-- Coloque isso após a tag de abertura <jasperReport> -->
<style name="Barcode" mode="Opaque" forecolor="#000066" backcolor="#FFFFFF" fill="Solid" hAlign="Left" vAlign="Top" markup="styled" fontName="SansSerif" fontSize="11"/>
<!-- ... -->
<detail>
    <band height="125" splitType="Stretch">
        <componentElement>
            <reportElement style="Barcode" x="230" y="43" width="78" height="38" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true" uuid="e70dd866-d0a9-4b34-8fb1-0f0b04c9dcf3"/>
            <jr:Code128 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[$F{nomedocampo}]]></jr:codeExpression>
            </jr:Code128>
        </componentElement>
    </band>
</detail>

As for the code to use Barcode documentation clarifies:

  

Some of linear symbologies are highly standardized, some are niche-oriented, most of them presenting mixed features. Below are few examples:

     
  • Universal Product Code (UPC) - International Standard ISO / IEC 15420. There are 5 versions of the UPC symbology designed for future industry requirements: UPC A, B, C, D,   
  • Codabar - Outdated format used in libraries, blood banks and on air waybills. Not standardized.
  •   
  • Code 25 - Interleaved 2 of 5 - Used in wholesales and libraries. International standard ISO / IEC 16390
  •   
  • Code 39 - International standard ISO / IEC 16388
  •   
  • Code 128 - International Standard ISO / IEC 15417
  •   
  • EAN-8 - International Standard ISO / IEC 15420
  •   
  • EAN-13 - International Standard ISO / IEC 15420
  •   
  • JAN - Available for Japan, compatible with EAN-13 (ISO / IEC 15420)
  •   

    Dai has to see what the device supports, usually this is said on the packaging. But being the ones mentioned above should work.

    Credits: link

        
    08.08.2017 / 01:37