none
Embedding images from blob storage in SSRS report does not work.

    Question

  • Hello everyone,

    today I am faced with a big problem.

    I am part of a team creating a big solution for our customer that involves several websites and a big reporting environment (SSRS 2012, not azure reporting).

    Recently we have migrated all our images to Windows Azure Blob Storage. Accessing these images works like a charm in our websites, or just using a browser.

    However, since we have migrated the pictures they do not show up in the rendered reports anymore.

    When watching the design of the report the picture shows up fine. However, once the report is run it only shows a little red X.

    This we checked:

    - Other external pictures (from both our own domain, or something like the google logo) all render just fine

    - Pictures from someone else's blob storage account do work!!! Specifically some logo's from the aston martin website.

    Our picture that doesn't render: https://storagenoa.blob.core.windows.net/images/companylogos/NOA_roze_grijs.gif

    Another pictures that does render: http://astonmartin.blob.core.windows.net/cc100/img/centenary.png


    Does anyone have a clue what could be wrong or how to find out what is wrong?

    Thursday, September 26, 2013 1:43 PM

Answers

  • Please check the content type property of the blob. I intercepted the network traffic in IE developer console and it showed me the content type of the blob to be "application/octet-stream" (which is the default content type of a blob in case nothing is specified) instead of "image/png". My guess is that SSRS is going by the content type and actually trying to download the file instead of rendering it in the report. If you access your blob URL in Chrome, you will see same behavior i.e. it will download the file instead of displaying it (IE is more forgiving in that sense).

    Hope this helps.

    Thursday, September 26, 2013 6:47 PM

All replies

  • Please check the content type property of the blob. I intercepted the network traffic in IE developer console and it showed me the content type of the blob to be "application/octet-stream" (which is the default content type of a blob in case nothing is specified) instead of "image/png". My guess is that SSRS is going by the content type and actually trying to download the file instead of rendering it in the report. If you access your blob URL in Chrome, you will see same behavior i.e. it will download the file instead of displaying it (IE is more forgiving in that sense).

    Hope this helps.

    Thursday, September 26, 2013 6:47 PM
  • This worked like a charm.

    With a few lines of code I updated all the files, and they render as expected.

    Thanks a lot!

    Friday, September 27, 2013 8:45 AM
  • Glad I was able to help you out. One thing - Since you asked the question, you can mark my response as an answer instead of just proposing that as an answer :).
    Friday, September 27, 2013 8:56 AM
  • This is another user account (see the lack of whitespace), because I can't access the other bloody account anymore!I have no clue how to regain access to it.

    If I do regain it, I'll still mark your answer.

    Friday, September 27, 2013 9:00 AM
  • A sample of the working code would be helpful also...  :-)

    Best, CM+

    Friday, April 04, 2014 3:48 AM