0

I need to display a numeric value (document number) as barcode. I use Code39 to convert. It is important to concatenate %-character as first, and $-character as last character to my number.

Here is my code:

Code39Full ("%" & ToText({Command.DocNum}, 0, '') & "$")

That should show up:

%217006169$

but it appears this:

%217006169/D

Any suggestion?

braX
  • 11,506
  • 5
  • 20
  • 33
LewoSoft
  • 73
  • 1
  • 2
  • 12
  • Where are you getting your `Code39Full()` function? Is this a UDL (User Defined Library, usually referencing a DLL file). When I encode barcodes in Crystal Reports, I have two UDLs for Code 39 barcodes, one is Azalea (u25azalea.dll) and Bar (u2lbar.dll) and I am unable to recreate the results you are describing in your output. I suspect your UDL function may be the culprit, and may not be encoding all of the special characters correctly. – R. McMillan Jan 19 '22 at 18:25

1 Answers1

0

I found out the easyest solution for my problem.

Steps for the right barcode:

  1. Creating a new formula for the barcode with the following text:
  2. "%" & CStr({Command.DocNum}, 0, '') & "$"
  3. Drag and drop the formula into the document
  4. Right click on the formula
  5. Choose the "Change - Barcode..." option, than
  6. Choose "Code39" from the list
  7. Click "OK" :)

Now it works perfectly!

With this CrystalReports built-in tool no needid choosing the font type, or inserting any barcode function into the formula.

LewoSoft
  • 73
  • 1
  • 2
  • 12