How to convert $ character with Code39 in CrystalReports?

482 Views Asked by At

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?

1

There are 1 best solutions below

0
LewoSoft On BEST ANSWER

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.