lotius81
31st October 2018, 17:46
Is it possible to suppress the human-readable value in a code39 barcode and only see the bars? Is there an option for that I can set in bc$()? I was trying to find any info in the bwprint help file, but with no luck.

Thanks!

BaanInOhio
31st October 2018, 18:10
The fourth (options) argument of bc$ includes an option to disable the human readable text. You have to disable it since it is set by default.

bar.code = bc$(9, bc.size, bc.string, NOT BC_SHOWTEXT)

lotius81
1st November 2018, 14:47
That makes sense. I tried it with no luck. It still prints the human-readable.

I tried adding the NOT BC_SHOWTEXT directly in the print expression, which is where my bc$() is normally. I then moved the whole bc$ call out of the print expression and tried to do it in report script. Still no luck.

Maybe I have an out of date portingset or something?

JaapJD
1st November 2018, 16:23
Programmer's manual says: "The BC_SHOWTEXT and BC_TRANSPARENTBACKGRND options are always implicitly set for the 3- and 5-argument variant of the bc$() function". With 'not BC_SHOWTEXT', you pass 0 (false) in the 4th argument. Probably that is interpreted as not-passed, so it shows the text by default. Because the transparent background is also default, and you have no problem with that apparently, you can try:

bar.code = bc$(9, bc.size, bc.string, BC_TRANSPARENTBACKGRND)

lotius81
2nd November 2018, 15:06
So far I've tried the following variations:

item.barcode = bc$(9,4,shiftl$(trim$(tisfc001.mitm)),NOT BC_TRANSPARENTBACKGRND)
item.barcode = bc$(9,4,shiftl$(trim$(tisfc001.mitm)),BC_TRANSPARENTBACKGRND)
item.barcode = bc$(9,4,shiftl$(trim$(tisfc001.mitm)),BC_SHOWTEXT)
item.barcode = bc$(9,4,shiftl$(trim$(tisfc001.mitm)),NOT BC_SHOWTEXT)
item.barcode = bc$(9,4,shiftl$(trim$(tisfc001.mitm)),bit.and(BC_SHOWTEXT,BC_TRANSPARENTBACKGRND)
item.barcode = bc$(9,4,shiftl$(trim$(tisfc001.mitm)),NOT bit.and(BC_SHOWTEXT,BC_TRANSPARENTBACKGRND)
item.barcode = bc$(9,4,shiftl$(trim$(tisfc001.mitm)),bit.and(NOT BC_SHOWTEXT,NOT BC_TRANSPARENTBACKGRND)

Always shows human-readable.

BaanInOhio
2nd November 2018, 16:16
Just a wild guess - but ensure that the item.barcode field is longer than the tisfc001.mitm field to ensure that the extra characters added before and after the string to print fit in the field. I have found that if I want to print something like an order number at 9 characters, I would need a much larger size for the string created by bc$. Try to print with item.barcode set to something like 80 characters just to rule out having a piece of the resultant string truncated.