Not able to scan Barcode, generated by AX

Dear All,

The barcode generated using Ax is not being detected by the barcode scanner. I have bought a barcode scanner yesterday and tested it on various price labels, it was working fine but it not able to scan the barcode generated by the AX .

I have used the folowing 2 codes yet it was not working

Display str ShowBarcode()
{
BarcodeCode128 MyBarcode;
;
MyBarcode= BarcodeCode128::construct();
MyBarCode.string(true,InventTable_1.ItemId);
MyBarCode.encode();
return MyBarCode.barcodeStr();
}

Display str ShowBarcode_1()
{
return “"+strupr(InventTable_1.ItemId)+"”;

}

Please help guys…is it the printer issue because the barcode scanner (Symbol) works fine since i have tested.