Skip to Content

Inserting dynamic images in Crystal reports

Following is the method required to add dynamic images to Crystal Reports.

The example adds the image from the item master.

NB: You will need to have the OADP table and the OITM table in your report, or have the relevant fields in your command.

The image path is stored in OADP – OADP.BitmapPath

IF ISNULL({OITM.PicturName}) THEN ‘’ ELSE {OADP.BitmapPath}&{OITM.PicturName}

First add a picture to your details section where your item code is using the insert picture icon:

CR Tool Bar.png

This open a browse box, just choose any image, as it will be replaced in the next step

Right click on the image you have created & choose “Format Graphic”:

CR Editor.png

From the Editor, choose the Picture tab, then select the formula button beside Graphic Location .CR Formula.png

Create a formula that starts with the bitmap path: {OADP.BitmapPath}, then adds the image name for the item code { oitm.PicturName}

You may also need to deal with NULL values in the graphic location path – e.g. IF ISNULL({OITM.PicturName}) THEN ‘’ ELSE {OADP.BitmapPath}&{OITM.PicturName}

You may need to do some image resizing, and put the can grow on to get the image to fit a space.


The image should now display dynamically.

Be the first to leave a comment
You must be Logged on to comment or reply to a post.