locked
Use variable path to retrieve image RRS feed

  • Question

  • 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?

     

     

    Tuesday, May 17, 2011 7:26 PM

Answers

  • 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.

    • Proposed as answer by Ramakrishnan.lh Wednesday, May 18, 2011 6:42 PM
    • Marked as answer by Challen Fu Wednesday, May 25, 2011 10:58 AM
    Wednesday, May 18, 2011 6:31 PM
    Answerer

All replies

  • 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.

    • Proposed as answer by Ramakrishnan.lh Wednesday, May 18, 2011 6:42 PM
    • Marked as answer by Challen Fu Wednesday, May 25, 2011 10:58 AM
    Wednesday, May 18, 2011 6:31 PM
    Answerer
  • Thanks Lawrence, with a slight modification this works perfectly.
    Monday, May 30, 2011 9:15 PM