I am developing a WinForms App which can generate a report of my college students.
I am using Crystal Reports but I don't know how to retrieve student photos from the file system.
Student photos are stored on the file system and use this naming convention:
C:\Id Maker\"Clgid".jpg
Where Clgid
is a value stored in a database.
As an example my Clgid
is 2009UCS020
which links to my photo on the file system as C:\Id Maker\2009UCS020.jpg
I am struggling on how I can lookup the database value of Clgid
and then retrieve the photo from the file system so I can display it in my Crystal Report.
First, add a graphic as a placeholder into your report where you want it to display. Then, right-click the graphic -> 'Format Graphic' -> 'Picture' tab -> Add a formula under 'Graphic Location' that builds your path string. Something like
'C:\Id Maker\' + {table.Clgid} + '.jpg'
should work.