'Draw an image in Crystal Reports from a binary string

folk,
I'm trying to develop something for our Crystal Reports that generates an EAN barcode image from the numeric string.
I've already developed a function in our SQL database to encode the numeric string as the ones and zeroes that represent the bars and spaces but I'm at a total loss as to:

  • How I would store this in the DB (other than a VarChar(100))
  • How to translate these ones and zeroes to an actual image (even if only 1 pixel in height)

Much obliged.


Solution 1:[1]

You can use a library such as ZXing.

Another option, given that you are looking for an image rather than font solution, is to use a Crystal Reports UFL (User Function Library). Ken Hamady maintains a list of 3rd-party UFLs here.

At least one of those UFLs caters to many types of barcodes, including EAN.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 MilletSoftware