calyn_gately
16th July 2008, 03:08
Hi Support,

May i know how to concatenate 2 report fields into barcode field as shown in attached file. :rolleyes: Please find attached file for your reference.


Thanks.
From
Calyn

mbdave
16th July 2008, 08:26
Hi

Can you try using two seperate report fields

Thanks

hserus11
16th July 2008, 08:47
Logic is correct and In the report I could see _ 10 which hidden in the barcode.
Some thing to do with the allignment.

Regards,
Suresh.

pconde
16th July 2008, 08:53
Hi,
Your code seems correct
point of attention:
1) maximum length that your barcode sytem can work with it (some barcode have limited length)
2) does the barcode support "_" ? ( some barcode allows only numeric character)
3) from baan quick guide 1310:
p.barcode = chr$(27) & chr$(22) & “XYZ“ & “Q541200”

The 3rd character of the “XYZ” (referred to as “Code 3” on the next page), must coincide with the input string length, or the barcode won’t print.


Regards
Philippe

mark_h
16th July 2008, 14:37
Philippe is correct some barcode formats do not like certain characters. I have to parse some of our barcodes. So make sure you check the characters supported by your barcoding format.

function domain tcmcs.str45 barcode.the.item(domain tcitem some.item)
{
domain tcmcs.str45 barcode.item
domain tcmcs.long barcode.length, i

barcode.item = strip$(some.item)
barcode.length = len(strip$(barcode.item))
for i = 1 to barcode.length-1
if barcode.item(i;1) = "/" then
barcode.item = barcode.item(1;i) & "O" & barcode.item(i+1;barcode.length)
endif
if barcode.item(i;1) = "+" then
barcode.item = barcode.item(1;i-1) & "/K" & barcode.item(i+1;barcode.length)
endif
endfor
return(barcode.item)
}

calyn_gately
17th July 2008, 02:55
Thanks for all your replies.

May i know how to parse "_" character and change my barcode coding in order to concatenate 2 report field?

mark_h
17th July 2008, 04:25
What barcode type? The only one we use is barcode 3 or 9.

calyn_gately
17th July 2008, 05:49
Hi all,

Please find attached file for the screenshot for more information. Even if there isnt have any "_" special character. The line no will still appear in the barcode line. May i know why it is so? :confused:


Thanks again for your previous replies.

calyn_gately
17th July 2008, 06:06
If there isn't any special character, how is the script to avoid the line no appear at the barcode line? Please refer to the attached file. Thanks.

pconde
17th July 2008, 09:06
Hi Calyn,

field whinh312.rcno is not numeric (WRC029976) then your code should be:
barcode.pdno = chr$(27) & chr$(22) & "*#)" & whinh312.rcno & str$(whinh312.rcln)

Also I think that this have to do with the maximum barcode length.
" p.barcode = chr$(27) & chr$(22) & “XYZ“ & “Q541200”

The 3rd character of the “XYZ” (referred to as “Code 3” on the next page), must coincide with the input string length, or the barcode won’t print."

You use "*#)": are you sure that ")" is the correct code for 13 character (9 + 4)?
Regards
Philippe

croezen
17th July 2008, 09:40
"*#)" is an "code 128" barcode of of 9 characters.

If the length isn't correct the barcode won't print.

if you want to use "XYZQ541200" as inputstring you must use "*#*"

See also BaaN quick guide 1310.

calyn_gately
17th July 2008, 12:44
Hi All,

Sorry to say that i could not make it after i have put this script into the report. I am newbie to this barcode printing script so really sorry to disturb u again.:o

barcode.pdno = chr$(27) & chr$(22) & "*#*" & whinh312.rcno & strip$(str$(whinh312.rcln))

the report output now will be shown in attached file where the 0 now appear in the barcode line. I really dunno what is the right symbol for the (9+4) characters. :confused:


Really thanks you for help.....

croezen
17th July 2008, 13:06
You have to reserve 3 lines for the barcode to print.
Are you printing this "0" somewhere else in a layout?
I don't think the barcode is printing this "0".

pconde
17th July 2008, 13:10
Hi Calwyn

I think that the correct solution can be
barcode.pdno = chr$(27) & chr$(22) & " *#-" & whinh312.rcno & edit$(whinh312.rcln, "9999")
So the barcode to print is forced to 13 characters :)
Now the third character for the barcode length I'm not sure :(. Come from quick guide 1310 but there is no details

Regards
Philippe

calyn_gately
17th July 2008, 13:26
hi phillipe,

I have done it after i put the barcode that you gave me! Thanks for your help *10000000 :p:p

pconde
17th July 2008, 13:30
HI Calwyn

Glad that it succeeded. On baanboard i found a link that explain how to generate these 3 strange characters see
http://www.baanboard.com/baanboard/showthread.php?t=15463
Can be useful for your next barcode:)

Regards
Philippe