Barcoding a space

I am trying to barcode a field value that has a space in it. When the barcode scans, the space comes in as a square (like when Windows cannot display the character). I have tried replacing with num2char(0) and num2char(194) with no luck. I have used the Bill of Lading report as an example. It is a barcode class 128 barcode. Any suggestions?


In NAV it works with

// convert SPACE to ALT+0128
pText:=CONVERTSTR(pText,’ ',‘€’);

Maybe that will work in AX as well.

Not sure if this will help or not, but maybe an idea to try, we have a barcode with spaces in it.

The code we used was to build the string format using sting format function, after declaring your bar code variable as a string value, use StrFormat(’%1 %2’,field a, field b) - should read something like BillOfLanding.string(StrFormat(’%1 %2’,field a, field b)

Hope that helps. Please let me know if that worked. As I said I am not 100% sure.

Hi Rich,

For inspiration, have a look at standard Ax barcode classes.

BTW how the bar codes are created in the first instance?

Hope this helps,