How to insert dynamic images in Crystal Reports

I am developing a WinForms application that can generate a report from my students.

I use Crystal Reports, but I do not know how to get student photos from the file system.

Student photos are stored in the file system and use this naming convention:

C:\Id Maker\"Clgid".jpg 

Where Clgid is the value stored in the database.

As an example, my Clgid is 2009UCS020 , which refers to my photo in the file system as C:\Id Maker\2009UCS020.jpg

I'm struggling with how I can find the value of the Clgid database and then extract the photo from the file system so that I can display it in my Crystal Report.

+6
source share
1 answer

First add the graphic as a placeholder in your report where you want to display it. Then right-click on the graphic → “Graphics Format” → “Image” tab → Add the formula in the “Graphic Location” section, which builds your path bar. Something like 'C:\Id Maker\' + {table.Clgid} + '.jpg' should work.

+5
source

Source: https://habr.com/ru/post/907307/


All Articles