Is there a possibility to display an image from a network share/sharepoint in a SSRS report based on the entry ID that is being queried?
I know that it is possible to have an image from the database but is it possible from an external source like shared drive/ sharepoint?
Example:
- I have network shared folder "images". In it the images are called 1.jpg, 2.jpg etc.
- In the SSRS report I query a database that returns results with ID 1, 2, 3 etc.
- Based on the queried ID, images should be displayed accordingly - ID 1 = 1.jpg
Using an expression that checks if ID 1 then display 1.jpg wouldn't be a solution I think as there could be thousands of IDs, unless there's a way to write the expression to be dynamic, etc if x ID, then display //path/x.jpg.
Thanks!
CodePudding user response:
You can set the value
property of the image control to an expression, for example...
="\\myFileServer\myFolder\image" & Fields!FileNumber.Value & ".png"
Would return ="\\myFileServer\myFolder\image1.png"
etc.
Be aware the the path must be visible from the server running SSRS (and also by the service account / user)
Start by adding a textbox with the path expression as above to make sure you are getting the values you expect and then set the image property once you are happy with the results.