Adding a picture to a report

  • I need to add the photo of the employees to a report. Their are two fields in the employee table with the folder name and the file name. The actual pictures are on another server. How would I do this.

  • I can think of a couple of ways:

    use SSIS to create a staging table that contains the images and data from the two servers - and then use this newly created SQL table for your report. This would be a simple SSIS package and you could run this overnight using the agent to keep it up to date (well, midnight old). Emmployees don't get added that often so data latency shouldn't be too much of an issue.

    use a linked report - you could write two reports, one for the employee data (report 1) - and one (report 2) that is invoked when you click on the employee name in report 1. Report 2 could just consist of a name and employee picture. This is probably the best option (imho) as I'm not sure you'd want to render every picture each time you run the report - just the picture of the person you are interested in maybe?

    Note this will need a reliable relation between the two server datasources - i.e. employee code or something.

    use a subreport that uses the same kind of logic as option 2 (i.e. each report uses a different dataset). I'm not a fan of subreports though as they always tend to be a bit clunky when I have anything to do with them!

    Hope you solve it! 🙂

    jag7777777

  • I think you can just add an image to the report where you want it to go, then set the "Image source" to external and use an expression to build the folder and file name. Depending on how you set up security on your report server, the file should be accessible to the security instance under which the report is being run.

  • I got it. I meant to come back on here sooner and post my solution. It was so simple it makes me feel dumb. All I had to do was create virtual directory on the report server pointing to the server and folder that has the images. Then in my report my image was set to external. I created a formula to create the path and file name I needed. Thanks.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply