Use variable path to retrieve image
I have a table that contains part numbers and the path to the image of that item.
Example
Part Number Path
78111 \\servername\Images\Parts\78111.jpg
21925 \\servername\Images\Parts\21925.jpg
How can I get SSRS to display the image when the report is run? I can get the path to display as text and then make the Navigation go to the path and display the image but I can't get the image to display in the report.
Is storing the image in the database the only way to make this work?
May 17th, 2011 3:30pm
Hi,
You can try using an Image Report Item with its Source type set to "External" and its Value set to an expression pointing to the image file, e.g.:
="file:\\servername\Images\Parts\" & First(Fields!PartNumber.Value) & ".jpg"
Of course, this will require report rendering process to have access permission to your image files.
Hope this helps!
Regards,
LawrenceThis posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
May 18th, 2011 2:31pm
Hi,
You can try using an Image Report Item with its Source type set to "External" and its Value set to an expression pointing to the image file, e.g.:
="file:\\servername\Images\Parts\" & First(Fields!PartNumber.Value) & ".jpg"
Of course, this will require report rendering process to have access permission to your image files. This might be easier to manage if you upload the images to your report server along with your report. If the report and images are
on the same report server, I believe you can use relative path in the Image Report Item's Value.
Hope this helps!
Regards,
Lawrence
This posting is provided "AS IS" with no warranties, and confers no rights.
May 18th, 2011 2:31pm
Thanks Lawrence, with a slight modification this works perfectly.
Free Windows Admin Tool Kit Click here and download it now
May 30th, 2011 5:17pm