Oracle Analytics Cloud and Server

Products Banner

Bar code not scannable

Received Response
992
Views
36
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.

«1

Answers

  • timdexter
    timdexter ✭✭✭✭✭

    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

  • Antoine KAIBER
    Antoine KAIBER ✭✭✭✭✭

    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 ✭✭✭✭✭

    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 ✭✭✭✭✭

    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 ✭✭✭✭✭

    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 ✭✭✭✭✭

    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 ✭✭✭✭✭

    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 ✭✭✭✭✭

    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 ✭✭✭✭✭

    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

  • timdexter
    timdexter ✭✭✭✭✭

    Couple of things:

    1. Can you move the BCR field to the top of the template. It looks like it appears after the barcode field which could be causing the issue.

    2. To confirm, you are using the E Business Suite version of Publisher?

    3. Can you send me the template and some sample data?

    Tim

  • Antoine KAIBER
    Antoine KAIBER ✭✭✭✭✭

    Here are a few screen fyi.

    Barcode template:

    Barcode.png

    Barcode Register :

    Barcode Register.png

    Fonts in BIP:

    Font BIP.png

    Report barcode (unscannable) :

    Report Unscannable Barcode.png

  • Antoine KAIBER
    Antoine KAIBER ✭✭✭✭✭

    This doesn't seem to work, I must be doing something wrong. Do you think I could send you my teamplate by mail ?

  • timdexter
    timdexter ✭✭✭✭✭

    For 11g the path does not use apps

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

    Check out my profile for my email -

  • Antoine KAIBER
    Antoine KAIBER ✭✭✭✭✭

    1. I moved the BCR field to the top of the rtf but it doesn't change anything.

    2. I'm using a 11.XX version of BIP as shown on this screen, this is why i took the path '<?register-barcode-vendor:'oracle.apps.xdo.template.rtf.util.XDOBarcodeUtil';'XMLPBarVendor'?> :

    BIP Version.png

    3. What is you email so I can send you the documents ?

  • timdexter
    timdexter ✭✭✭✭✭

    Hi

    I have solved the problem! I just needed to RTFM! Things in 11.1.1.9 and above changed when you wanted to use the fonts shipped with Publisher or the Publisher encoder class.

    https://docs.oracle.com/middleware/11119/bip/BIPRD/create_rtf_tmpl.htm#newfontsetup  --> Scroll to 4.17.1 Using the Barcode Fonts Shipped with BI Publisher

    You just need to use the following in your field

    <?format-barcode:SHIPMENT_XID;'code128a'?>

    No need for the 'XMLPBarVendor' parameter anymore. There is also no need to register the barcoder class or the barcode vendor unless you write your own encoder.

    I tested your template and data and its generating the encoded string and formatting with a code128 barcode that is readable with my phone app.

    Good luck!

    Cheers

    Tim

  • timdexter
    timdexter ✭✭✭✭✭

    timothy.dexter@gmail

  • Antoine KAIBER
    Antoine KAIBER ✭✭✭✭✭

    Ok I misunderstood you. I already tried with that line of code but it still doesn't work though. Your email doesn't appear in your profile, it must be in private.

  • Antoine KAIBER
    Antoine KAIBER ✭✭✭✭✭

    For the 1st choice I have already tried but it doesn"t work: i've uninstalled the code 128 font I had uploaded on bip so (fopefully) it would take the default code 128 font of BIP but it doesn't do the link with the template. What font should I choose for the barcode field in the rtf ? Since I don't have the equivalent of the default code 128 which is in BIP...I can't (or at least I haven't found how) donwload the font from BIP contrary to what you said and I don't have it in BIP on word (donwloading BIP for word didn't add any fonts)

  • timdexter
    timdexter ✭✭✭✭✭

    I just have the barcode font that ships with publisher. I believe its pre loaded to the server so you can just go get it or its installed with the BI Pulisher Desktop.

    As for your output I just tested with your code 128 font and the Oracle encoder and I get the same result as you ie characters that are not handled by the font like the copyright glyph

    You have a couple of choices:

    1. Abandon the font you downloaded and use the Oracle fonts. I have tested them with the Oracle encoder and they work perfectly

    2. Find  out the encoder algorithm code needed for the current font and implement your own encoder class.

    #1 is going to be much easier and you can move on to the next challenge and forget coade128 barcodes for a while

    Cheers

    Tim

  • Antoine KAIBER
    Antoine KAIBER ✭✭✭✭✭

    Hi Tim,

    Thanks for your help, unfortunately this is not working for me, I had already tried using <?format-barcode:SHIPMENT_XID;'code128a'?> but it doesn't work. When I run the teamplate this is the kind of barcode I get :

    Barcode error.png

    I just used the template I sent you and changed the code in bardcode field to <?format-barcode:SHIPMENT_XID;'code128a'?>.

    Do you remember where you downloaded your Code 128 font ? And did you upload it onto bip ? Under what name ?

  • timdexter
    timdexter ✭✭✭✭✭

    The BIP Code 128 fonts are available in the BI Publisher installation directory. There is a fonts directory under the Template Builder for Word directory.

    Install the Code 128 font into windows and use that in MSWord.

    Once on the server, BIP will pick up the font and use it

    Tim

  • Antoine KAIBER
    Antoine KAIBER ✭✭✭✭✭

    I see there is text required in barcode font, for instance  ÌCodeÂÇ,tXXÎ for code 128 :

    Cannot scan data printed with a barcode font do you know where I should put this ?

  • Antoine KAIBER
    Antoine KAIBER ✭✭✭✭✭

    So I reinstalled BIP for desktop and used the font that is comes with the add-in and my barcode is a bit longer than before in the template and this is what I have :

    But when I run the report this is the kind of barcode I get :

    So basically it seems like it's the same as before.

  • timdexter
    timdexter ✭✭✭✭✭

    I think you have mixed up the fonts.

    I would

    1.remove the fonts from the windows/fonts directory on your local machine

    2. Then do the same on the server with the font that you downloaded.

    3Now install the BIP delivered font from the Template for Word/fonts directory into the windows/fonts dir

    4Use the font in the template

    5The command you are using is correct.

    <?format-barcode:SHIPMENT_XID;'code128a'?>

    code128a refers to the encoding thatyou want applied to your SHIPMENT_XID data not the font you are using.

    6 Save and deploy to the server as a new template

    Run it and check the result.

  • Antoine KAIBER
    Antoine KAIBER ✭✭✭✭✭

    I can't manage to make it work. If the font installed in word is called "Code 128" and in my rtf I put

    " <?format-barcode:SHIPMENT_XID;'code128a'?> ", in BIP it should be "Code 128" right ?

  • timdexter
    timdexter ✭✭✭✭✭

    1. The barcode font being used is the one you downloaded from here:https://www.dafont.com/fr/code-128.font  I know its that font because I can reproduce the issue only with that font. Using the BIP code128 barcode, you will not get regular charachers in the barcode.

    So, that font is still in your system somewhere and is being used still.

    2. I saw that issue with dots when you sent me the template. Im not sure if it was some translation issue with Word when it rendered for me in my English version of Word. I just pasted in the command again and it worked and remained OK.

    Tim

  • Antoine KAIBER
    Antoine KAIBER ✭✭✭✭✭

    And now when I upload my template onto BIP which the encoded string *<?format-barcode:SHIPMENT_XID;'code128a'?>* (yes I added the " * " this time)  I get this kind of barcode in my report :

    And when I download my template again it doesn't show the encoded string but this instead :

  • timdexter
    timdexter ✭✭✭✭✭

    Pleased you have it working :0)

    Some points would be greatly appreciated at this point (excuse the pun)

  • Antoine KAIBER
    Antoine KAIBER ✭✭✭✭✭

    It works ! Apparently it was in the font mappings properties of the report in BIP :

    I had several font families that I had uploaded onto bip then suppressed them (in administration -> font mappings) but they were still in the properties of the report. So I deleted them there aswell and apparently I had to rename the "Default Code 128" into "Code 128" (how the font is named in word) for it to work (I had already dont it in administration -> font mappings) but it hadn't work at the time, for many reasons I guess.