0

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

1 Answers1

0

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.

MilletSoftware
  • 3,521
  • 2
  • 12
  • 15
  • Thanks but I'm trying to develop this so it doesn't rely on an external source. It's not just for barcodes, I'd also like to develop something for things like drawing the lines between organisational charts, or regression lines (where CR can only draw horizontal or vertical) or even custom icons. Maybe there's a different approach - might I store the binary (ones and zeroes) data as an image in a blob in SQL? I've tried comparing my string to a couple of results of an `openrowset (bulk 'filepathandname', single_blob)` statement but it's not so easy to glean a pattern from this. TIA. – Cory Mar 04 '22 at 10:29