Answered Random Image Non Display

  • Wednesday, March 09, 2011 1:09 PM
     
     

    I have a report that displays dynamic images based on a value set like this:

    ="/Printing/Images/Logos/" & (Fields!Name.Value) & ".png"

    Sometimes an image is displayed somethimes not. I can't make out why. The image is not large in size or file size.

All Replies

  • Wednesday, March 09, 2011 1:22 PM
     
     

    First print Fields!Name.Value somewhere on the report and verify that the mathing png file exists (so it doesn't look for NULL.png or something like that)

    If that works then try to look when it displays and when not. Is it when another person tries to run the report (read permissions then on the folder/share with images) ? If you run the report on the reportserver or from another pc ? ..?

     

  • Wednesday, March 09, 2011 2:19 PM
     
     

    Hi Aeneas,

    If I run the report in Reporting Services, everything displays fine. If I run in Report Builder at the same time, images randomly arent displaying. I have noticed though that in Print Layout mode I have the issue. In non PrintLayout mode, the images display.

  • Thursday, March 10, 2011 7:39 AM
    Moderator
     
     

    Hi,

    Firstly, I wan to confirm with you which kind of image source you are using, Exbedded or External? From your dynamic images value ="/Printing/Images/Logos/" & (Fields!Name.Value) & ".png", it seem like you deploy the image to the reort server then quote this external image on your reoprt, right? your image value is relative path not the whole path, if you want to still display the image in Print Layout mode when preview the report, you could modify image's value to ="Http:/ServerName/ReportServer?/Printing/Images/Logos/" & (Fields!Name.Value) & ".png"


    Challen Fu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Monday, March 14, 2011 10:02 AM
     
     

    Hi Challen,


    Thats correct. Image is deployed onto the server, and then I reference dynamically. I tried putting the full URL as suggested, into the image value, but none of the images display then. I tried putting the URL into the browser to see if could pick up the image, and the image displays.

    Update: I've just tried accessing the image directly from the report server browser, but it can't be displayed, event though from my machine it can.

  • Tuesday, March 15, 2011 10:08 AM
     
     Answered

    I've kind of got a 2 solution (not perfect, but they do the job)

    1) Create a virtual directory of images and point my Image Value to this. This seems to work

    2) Create a database and keep the images in a database and return it with the data to the report.

    I'm opting for Option 2