Hi,
The following sample 4GL code prints a barcode for 6 characters at a time; combining the required escape sequences. I have tested this with ordinary dot-matrix printer and it works fine. For Barcode alignment (printing location on paper, barcode width etc.) you may tune the parameters like ^R,^B etc.
For example:
"^R20;0"
"^R76;0"
"^R130;0"
"^B18;1;1;1"
"^B14;0.01;1;1
etc ...
main
define string varchar(50), x char(6), i smallint
start report bcode to "bc"
let string="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
let i=1
while(1)
let x = string[i,i+6]
output to report bcode(x)
let i=i+6
if i>=36 then
exit while
end if
end while
finish report bcode
end main
report bcode(a)
define a char(6)
format
on every row
print ascii(27),
"[<4h", ascii(13),
"^R20;0", ascii(13),
"^B14;1;1;1", ascii(13),
a, ascii(13),
ascii(27),
"[<4l", ascii(13)
end report
Regards,
Shriyan