chiahy
9th January 2006, 04:05
Hi, good day all.
Anybody here familiar with function bc$()? This is a function to print barcode. My platform is:
OS: Win 2000 Adv Server.
DB: MS SQL 2000
Baan IV c4
I try to use bc$() in my report script, but it cannot work. It cause my bwprint.exe overflow. (Running no stop and no report come out).
Hope can get some advice here.
Thank You :-)
george7a
9th January 2006, 09:17
Hi,
How are you using it? Can you show your code?
Here is the manual:
http://www.baanboard.com/programmers_manual_baanerp_help_functions_char_b_win_bc
- George
chiahy
9th January 2006, 11:24
In the report script, i add 1 line:
test.barcode = bc$(02, 2, "123")
then in ttadv3134s000, i just add field test.barcode
bdittmar
10th January 2006, 12:44
In the report script, i add 1 line:
test.barcode = bc$(02, 2, "123")
then in ttadv3134s000, i just add field test.barcode
Hello,
is the barcode type02 definition in$BSE/lib/barcode directory available ?
Regards
chiahy
11th January 2006, 11:19
em... sorry, what mean "barcode type02 definition in$BSE/lib/barcode directory " :confused: :confused: :confused:
Moon Lok
11th January 2006, 11:28
As for your reference. There have some useful information on Baan Support Web about barcode printing. e.g.
QG1307 - Barcode printing with Unix
QG1310 - Barcode Printing and BWprint
Or you can just search the word "barcode" on baanboard.
regards,
bdittmar
11th January 2006, 11:48
em... sorry, what mean "barcode type02 definition in$BSE/lib/barcode directory " :confused: :confused: :confused:
Hello chiahy,
Syntax
string bc$( long type, long rows, string barcode(.) )
Description
Use this to create a barcode of the specified type.
Arguments
type
This points to a shell script that generates the barcode. The script is stored in the barcode directory; this is specified in the printer information file. The script names take the form 'typexx', where xx is a two digit number. For example 'type02'. You specify the two digit number in this argument.
rows
The height of the barcode, as a number of lines.
barcode
The string that must be converted to a barcode and printed.
In your case it means, ther must be a file "type02" in the $BSE/lib/barcode directory ($BSE is the path to your BaaN application!).
the type02 file content is like :
#!/bin/sh
# Lust Antriebstechnik GmbH - June 2003 B. Dittmar
# Barcode zum Drucken von Sonderzeichen!
# Type20 mit variabler transparenter Laenge
# push cursor
echo "\033&f0S\c"
# laenge=`echo $1 | awk '{ print rlength($1) }'`
bl=`echo $1 | awk '{ print length($1) }'`
# cat laenge > /tmp/test.txt
#CODE 128 autoswitch
echo "\033(10Q\033(s1p15vsb24700T\c"
#echo "\033&p$blX\c"
echo "$1"
# pop cursor position
echo "\033&f1S\c"
#Schrift aus PCL-Liste
#echo "\033(10U\033(sp10hsb4099T
The above script has to be in the printer-manufacturer subdir.
It means in case of HP-Printer in Directory :
$BSE/lib/barcode/hp/type02
Regards