Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Bar code not scannable

Received Response
1447
Views
37
Comments

Summary

Bar code not scannable

Content

Hello,

I'm currently working on a report template (rtf file) which is indexed on a field called SHIPMENT_XID. I put in my word document (with the bipublisher local add on for word) the code "<?format-barcode:SHIPMENT_XID;'code128'?>" and uploaded the font code128 onto BI Publisher.

The report comes through with a barcode but the barcode isn't scannable (i've tried with my android app which works for other barcodes). Am I missing something ?

Thanks in advance and sorry if I don't respect some codes here, first time I'm on an Oracle Forum.

«134

Answers

  • timdexter
    timdexter Rank 6 - Analytics Lead

    Hi

    The Code 128 barcode has three variants, a|b|c. You need to specify which encoding you want for the barcode string ie for type 'a' >>> <?format-barcode:SHIPMENT_XID;'code128a'?>

    If that is still not working then remove the barcode font from the string in the word template and use a readable font to check that the encoding is being applied to the string.

    Cheers

    Tim

  • Rajesh123
    Rajesh123 Rank 6 - Analytics Lead
  • Antoine KAIBER
    Antoine KAIBER Rank 6 - Analytics Lead

    Hello Tim,

    Thanks for your anwser and sorry for my late replay.

    I had already tried to add the types "a" "b" and "c" but it doesn't work with any of them. Sorry but I don't understand what you mean by the "string" in the world template. Where should I go exactly ?

  • timdexter
    timdexter Rank 6 - Analytics Lead

    To see if the encoding algorithm is being called correctly. Remove the barcode font in the template and replace it with something like Arial ie humanly readable. Then run the report. if the encoder is being called correctly then you will see your original data replaced with an encoded string.

    You did add the register barcode field in to the template too right?

    Tim

  • Antoine KAIBER
    Antoine KAIBER Rank 6 - Analytics Lead

    If I remember well, I found my barcode font here https://www.dafont.com/fr/code-128.font . As for the scanner i'm using a android App to scan the bardcode, because i'm assuming if an android app can read it, any scanner will. And since my app can read font 128 and i'm using it, it isn't coming from my app but from the barcode.

  • timdexter
    timdexter Rank 6 - Analytics Lead

    Hi

    Just downloaded and tested the font. I took the string and encoded it using the web site here:

    The string 123456789012 is encoded as Í,BXnz,VÎ

    Then dropped that into a word document and tested the barcoded string with my phone and it works. So the font is OK, at least for that string and that encoder.

    So if the font is OK. Then the encoding is in correct.

    Can you modify the RTF template you are using and add a field

    <?format-barcode:'123456789012';'code128';'XMLPBarVendor'?>

    Use Arial as the font for the field. Run the template and share the output for that field.

    Thanks

    Tim

  • timdexter
    timdexter Rank 6 - Analytics Lead

    More questions ...

    OK, so a readable string say 123 Park Way Austin TX is being encoded as Í,È3ÂParkÂWayÂAustinÂTX-Î successfully.

    Assuming that, you now add the barcode font back in and get a barcode in the final output. However, the scanner can not read it, correct?

    Does the scanner have any settings on it to change what it can read. Some of them are able to scan anything and interpret the correct barcdoe. Others need to have the barcode type set.

    You mention that your barcode is called just Code 128. Whose barcode is it? Open source or a commercial one. Looking at your field, you are using the built in encoder rather than writing your own correct? IF you do have your own encoder class, can you share the code?

    Cheers

    Tim

  • Antoine KAIBER
    Antoine KAIBER Rank 6 - Analytics Lead

    The algorithm seems to work fine. My code behind my field is <?format-barcode:SHIPMENT_XID;'code128';'XMLPBarVendor'?>  I tried with code128a b and c but it doesn't work so i leave code128 because my font doesn't have a number (its called Code 128, I named it like that in BIP).

    And yes i've created a register barcode field with the code "<?register-barcode-vendor:'oracle.apps.xdo.template.rtf.util.barcoder.BarcodeUtilaaa';'XMLPBarVendor'?>"

  • Antoine KAIBER
    Antoine KAIBER Rank 6 - Analytics Lead

    This is what I get if I put your code with arial2017-11-03 09_19_52-Pick Up Sheet Report.png

    The concerned field is the one on the right (123456789012)

  • timdexter
    timdexter Rank 6 - Analytics Lead

    Then the encoder is either not working or not being called correctly.

    Seeing as you are using the encoder that ships with the BIP install you just need two fields in your template:

    1. The register bardcode field. This lets the template processor know that you are going to be calling the barcode encoder.

    <?register-barcode-vendor:'oracle.xdo.template.rtf.util.XDOBarcodeUtil';'XMLPBarVendor'?>

    The path to the the XDOBarcodeUtil class differs if you are using the EBS flavor of XML Publisher. The field should read

    <?register-barcode-vendor:'oracle.apps.xdo.template.rtf.util.XDOBarcodeUtil';'XMLPBarVendor'?>

    If you are using the 11g or above standalone or non EBS integrated release, then the path above is correct.

    2. The barcode field itself

    <?format-barcode:LABEL_ID;'code128a';'XMLPBarVendor'?>

    The shipped encoder needs the barcode specified (I cjecked the java class.) The code128 encoder supports code128a, code128b, and code128c. It does not support passing it just 'code128' it must have the a|b|c suffix.

    Make sure you have those fields in place and re-run to check that the encoder is being called correctly. Once it is, then add the field font to the barcode font and re-run. Then test the barcode with you cell phone app and all should be good.

    Cheers

    Tim