Custom Certificate Image

⌘K

Custom Certificate Image

This application note shows how to add a custom image to report. It is assumed that the user has good knowledge of Crystal Reports. Using Crystal Reports we will add an image the certificate template. Using a formula, the image where the file name contains the certificate number will be show after the cover page.

Image Naming and Location

For this example, a directory called Image_Data in the C:\Ec6\Reports folder is required. The image must be named <Certificate Number>_Image.jpg

The certificate number must not contain any certificate prefix.

Graphic Location Formula

 Right click on the image and select Format Graphic. Select the Picture tab.

Click on the Graphic Location formula editor icon.

The formula workshop window will appear.

The formula is written using the BASIC SYNTAX. Make sure this is selected from the drop down.

The formula used is as follows:

Dim liPos as number
For liPos = Len(Filename) To 1 Step -1       
If Mid(Filename, liPos, 1) = “\” Then
Exit For 
End if
Next formula =  Left(Filename, liPos) & “Image_Data\” & totext({CertHeader.CertNo},0,””) & “_Image.jpg”