Go Back > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor


Google search

How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
200 - 500 GB
500 - 800 GB
800 - 1200 GB
1200 - 1500 GB
1500 - 2000 GB
> 2000 GB
Total votes: 36

Baanboard at LinkedIn

Reference Content

Thread Tools Display Modes
Old 26th August 2017, 00:16
lotius81 lotius81 is offline
Join Date: Nov 2016
Posts: 33
lotius81 is on a distinguished road
Baan: Infor LN 10.4 - DB: SQL Server - OS: Windows Server 2008
Barcode in PDF
Baan: ERP LN 6.1 FP10 (Infor ERP 10.4)
C/S: Both

Trying to get barcodes working in PDF. We use Code39 barcodes in our plant.

In report script I have these lines..

domain tcmcs.str20 prod.barcode

prod.barcode = bc$(9,3,strip$(shiftl$(tisfc001.pdno)), 0x000c80)

Attempting to print prod.barcode results. All I get is some garble like the following:


I've tried changing the barcode value in the field options to 1, etc. Still can't figure out what I'm doing wrong Or if this is too vague I'm happy to provide more info..

Reply With Quote
Sponsored Links
Old 26th August 2017, 10:31
bdittmar's Avatar
bdittmar bdittmar is offline
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,734
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox - DB: tbase, ms-sql7, oracle10gV1, 11g - OS: HP-UX, W2K3, SLES

function string bc$  (long type, long rows, string barcode, long options)

Use this to create a barcode of the specified type.


long type barcode type, a number in the range 1-1000 for a 1D-barcode and 1001-2000 for a 2D-barcode.
long rows The height of the barcode, as a number of lines.
string barcode The string or data that must be converted to a barcode.
long options Options for the barcode, see below

This function can be used in all script types.

Options for barcodes

1D-Barcode option Description 
BC_AUTOPARITY calculate parity 
BC_TRANSPARENTBACKGRND transparent background 
BC_SHOWLIGHTMARGINS show light margins 
BC_SHOWBEARERS show bearer bars 
BC_EXTENDBEARERS extend bearer bar into light margin 
BC_SHOWTEXT show barcode caption text 
BC_CALCCHECKSUM calculate checksum 
BC_SHOWCHKDIGIT show checksum digit 
BC_FIXEDXUNIT use fixed xunits for barcode width 
BC_EXTRA_FLAG1 barcode specific extra1 flag 
BC_EXTRA_FLAG2 barcode specific extra2 flag 
2D-Barcode option Description 
BC2D_TRANSPARENTBACKGRND transparent background 
BC2D_AZTECFLAG Aztec flag 
BC2D_AZTECMENU Aztec menu option 
BC2D_AZTECRVIDEO Aztec reverse video 
BC2D_DATAMATRIXGS1 Datamatrix GS1 encoding 
BC2D_PDF417TRUNCATE PDF417 truncate 
BC2D_SET_MODE(m) mode, valid range: 0x0 - 0xF 
BC2D_SET_LEVEL(l) security level, valid range: 0x00 - 0x3F 
BC2D_SET_XUNIT(x) set x-unit, valid range: 0x00 - 0xFF 
BC2D_SET_MULYUNIT(m) set y-unit multiplier, valid range: 0x0 - 0xF 
BC2D_SET_COLUMNS(c) set columns, valid range: 0x0 - 0xF 
Multiple options can be combined with bit.or function or with + operator (e.g. if more than 2 options need to be combined). Note that not all options are applicable to all barcodes.

Deprecated variants

string bc$( long type, long rows, string barcode )

string bc$( long type, long rows, string barcode, [long calc_checksum, long show_checkdigits] )


The calc_checksum, show_checkdigits and options arguments are not used on non-Windows platforms.
The 3-argument variant of bc$() has a limitation to the barcode type, which need to be in range of 1-31.
The 3- and 5-argument variant of bc$() has a limitation to the barcode string of 224 bytes.
2D-barcodes are supported on Windows platform only, by BWPrint, starting with portingset 6.1c.09 (BW=B40c.95), 8.5a.02 and 8.5b.
Starting with these BWprint versions: a barcode.pdf file is supplied in the directory where BWprint is installed. This pdf contains information about the capabilities and allowed options for barcodes.
1D-barcode options and 2D-barcode options cannot be mixed and will result in unspecified behavior.
Windows platform/BwPrint
The barcode type points to a barcode type. Check the barcode-1D and/or barcode-2D test in the Help menu of BwPrint for available barcode types. The number of available barcode types depend on the thirdparty software from dlSoft. This software is used to generate the barcode images.

Non-Windows platforms
The barcode type points to a shell script that is used to generate the barcode. This script is printer and customer specific. The script is stored in the $BSE/lib/barcode directory. The script name has the form 'type xx ', where xx gets a leading zero for a barcode type with a value lower than 10. For example 'type02' or 'type100'. The script is called by the printer daemon/filter in the form (quotes are added, to surround the barcode caption): $BSE/lib/barcode/type type 'barcode 'rows.


print bc$( 2, 3, "87291803", bit.or( BC_TRANSPARENTBACKGRND,BC_SHOWTEXT) )
Also have a look at :
and search the forum with >>BARCODE<<, you#ll get a lot of hints !


Last edited by bdittmar : 26th August 2017 at 11:11. Reason: add link
Reply With Quote
Old 28th August 2017, 17:11
lotius81 lotius81 is offline
Join Date: Nov 2016
Posts: 33
lotius81 is on a distinguished road
Baan: Infor LN 10.4 - DB: SQL Server - OS: Windows Server 2008
Perusing the threads I haven't been able to figure it out still.

I've looked through the barcodes.pdf from dLSoft, PDF-Bar-Codes-Guide.txt, read the entire suggested thread (and multiple others) and was pretty hopefully in that thread that you gave me that bumbaermail's workaround would do the trick. Still nothing. I have my value, a production order number, and it only turns into a long what looks like a hashed value of characters preceded by "base64!".

I went directly into bwprint on the application server and looked at the example options given for a Code 39 type barcode. Tried several variations of bit.or() flags on the bc$() function. Tried setting my field in the layout to with the various barcode options. Barcode=0, barcode=1, barcode=1 and checksum.

I'm just stumped
Reply With Quote
Old 30th August 2017, 21:31
BaanInOhio BaanInOhio is offline
Senior Member
Join Date: Oct 2005
Location: Northeast Ohio
Posts: 186
BaanInOhio is on a distinguished road
Baan: Baan 4c4, 5C, LN - DB: Informix, Oracle, SQL - OS: HP UX, Win2K
Try printing to the windows printer, check 'preview'. If the barcode shows up in the preview display, it's probably an issue with the conversion from bwprint to PDF.

Also ensure that the text field where your barcode data is stored has enough room for prefix and suffix control characters. Start with something like 40 characters for a 9 character order number then reduce size until you no longer get an acceptable barcode.

If the barcode doesn't work in windows printer/preview, you should check the 'type09' file in your $BSE/lib/barcode/<device> folder. This is the file that appends the prefix and suffix control characters into the string sent to bwprint/printer.

Last edited by BaanInOhio : 30th August 2017 at 21:42.
Reply With Quote
Old 11th September 2017, 17:06
lotius81 lotius81 is offline
Join Date: Nov 2016
Posts: 33
lotius81 is on a distinguished road
Baan: Infor LN 10.4 - DB: SQL Server - OS: Windows Server 2008
I wanted to update this. After speaking with Infor we updated our tools to the latest patch versions and updated our porting set to 9.1a (although Infor recommends 9.1c).

After doing this I was able to get bar codes printing in PDFs.

Report Script for this looks like this:

      extern domain	tcmcs.str50m	prod.barcode

      prod.barcode = trim$(tisfc001.pdno)
Then directly in the prod.barcode's print expression, not in report script, I used the following:

and obviously set the domain to tc mcs.str50m.

Most importantly, I did not set the "bar code" value to 1 in the report field's layout, I left it as 0. This got my bar code to print to page.

Hopefully this helps someone else!

Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PDF output in BIRT tusharjain2204 Tools Development 4 19th August 2016 04:22
Adding Barcodes to label Medtun Miscellaneous 8 13th June 2015 16:02
Data Matrix Barcode bpanda Tools Development 1 8th April 2015 14:27

All times are GMT +2. The time now is 22:08.

©2001-2018 - -