Skip to Content

QR Codes in Crystal Reports

I just had an interesting support question from a customer, and felt the need to put pen to paper.

They’re finding that regular barcodes are getting too long, so want to switch to using QR Codes for their ID badges.

They use Crystal Reports to print the IDs, so need a solution for Crystal Reports. While a User Function Library (UFL) could be used, they’d prefer to avoid the extra work involved in installing the UFL on the PCs and Enterprise Server.

So, the best (only?) option is to use a Web Service and conditionally format an image in Crystal to show the correct QR code.

If you want to do things the hard way, head over to and look at the chart API.

If you want to do it the easy way, just do this:

  1. First head over to ZXing
  2. Define your base QR Code. It’s easier to edit this later with any custom information in Crystal Reports
  3. Create your Crystal Report
  4. Insert any old image, and make it slightly larger than you want the QR code to appear.
  5. Right click the image and select ‘Format Graphic’
  6. Select the Picture Tab
  7. Click the ‘Custom Format’ (x+2) button next to Graphic Location
  8. Paste in the URL you created in Step 2, put quotation marks around it so that it’s interpreted as a string
  9. Click OK
  10. You now have a static QR code in your report. You’ll probably need to adjust the sizing.
  11. Modify the URL you created in 8 so that the QR Code becomes dynamic and includes the information you need.

If you’re having problems, the zip file attached to this contains an empty report with a dynamically formatted graphic containing a QR code. You also get a picture of one of my ducklings thrown in for free!

EDIT: Not sure what happened to the file I attached. One of the mysteries of SCN I think. I’ve uploaded it to here

I must admit, I didn’t realise just how flexible QR codes were until I started this. I’m really impressed!

Another Edit: Sorry about the download link, it will now take you to the source blog where there is a working download.

If you’re having any problems, chances are you’re missing the http:// from the start of the image url

HTTPS isn’t supported either (that’s a Crystal thing, nothing to do with QR codes)

You must be Logged on to comment or reply to a post.
    • I could use some help here.

      I get everything working when I am using it in CR Designer and make a preview but when I use the report in the aplication where it's supposed to be it only shows the baseimage.

      I talked to a college and at his company it works. We have the same CR viewer.

      Any help or suggestions are more than welcome.

      • Sorry not to update sooner, I'm rarely on SCN. The download link will now take you to the source blog where there is a working download link.

        Thanks for reading.

  • Hi,


    My client has a requirement to add QR Code on their Delivery Order based on its value retrieve from Crystal Reports. We are using SAP Business One 9.2 version and Crystal Reports 2013. How can I create QR Code based on the data shown in the Crystal Report. Thanks.

  • Does this work with long URL? It appears to be cutting off... The URL I'm using feeds data to auto-populate a web form. Thus resulting in a long URL. The QR that ZXing generates works great and populates all the fields in the Web Form. But when I copy paste the formatted URL to the Crystal Reports image, as per the instructions above, Crystal generates a QR image but when I use the QR it appears to only auto-fill some of the fields in the web Form.