Baanboard.com

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

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 26th August 2017, 00:16
lotius81 lotius81 is offline
Junior Member
 
Join Date: Nov 2016
Posts: 28
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:

base64!GxlBQkFBRkJBa0pCYTBwQ1lUQndRMWxVUW5kUk1XeFZVVzVrVWs=

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..

Thanks,
Rich
Reply With Quote
Sponsored Links
  #2  
Old 26th August 2017, 10:31
bdittmar's Avatar
bdittmar bdittmar is online now
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,652
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
bc$()

Hello,
Code:
bc$()
Syntax:
function string bc$  (long type, long rows, string barcode, long options)
Description

Use this to create a barcode of the specified type.

Arguments

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
 
Context

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] )

Remarks

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.

Example

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

Regards
__________________
//Bernd

Last edited by bdittmar : 26th August 2017 at 11:11. Reason: add link
Reply With Quote
  #3  
Old 28th August 2017, 17:11
lotius81 lotius81 is offline
Junior Member
 
Join Date: Nov 2016
Posts: 28
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
  #4  
Old 30th August 2017, 21:31
BaanInOhio BaanInOhio is offline
Senior Member
 
Join Date: Oct 2005
Location: Northeast Ohio
Posts: 180
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
  #5  
Old 11th September 2017, 17:06
lotius81 lotius81 is offline
Junior Member
 
Join Date: Nov 2016
Posts: 28
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:

Code:
declaration:
      extern domain	tcmcs.str50m	prod.barcode

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

Code:
bc$(9,4,prod.barcode)
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!

Rich
Reply With Quote
Reply


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 10:12.


©2001-2017 - Baanboard.com - Baanforums.com