Draw an image in Crystal Reports from a binary string

290 Views Asked by At

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

There are 1 best solutions below

1
MilletSoftware On

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.