Skip to main content

Has anyone found a solution to show images, which are stored in Azure file storage, in a SSRS report?

SSRS = SQL Server Reporting Services

Direct access to a protected web location to be used by the SSRS report will be difficult - limited by the features of the reporting tooling. Public URLs, files on disk and blobs are the most straight-forward supported methods of embedding images in SSRS.

However, there certainly are new developments that will make this easier. In the upcoming release, 2022.2, it will be very easy to load files from file storages such as Azure files in system flows. This will use the existing file storage configurations without having to rely on http connectors.

You can use this to fetch the file and temporarily store the file on a disk location or in the database to be loaded as a blob by the report.


Hi Harm,

What you can do is obtaining the image data by using the HTTP connector to get the image data from Azure file storage. The Content result of the HTTP connector should be a varbinary(max) string that contains a blob of image data. This data can then be converted to base64 and given to the Report in a way, and be interpreted by SSRS as image.

Similar to how DevExpress does this, you can also achieve this in SSRS according to Base64 Encoded Images in SSRS 2008R2 (microsoft.com)

One answer in the link suggest doing the following inside the SSRS report:

=System.Convert.FromBase64String(Fields!base64textvalue.Value)

I hope this helps!

We are looking at ways to expand the File connectors to also be able to use other storage providers like Azure. This is a project for the 2021.3 release.


Hi Mark,

Thank you, but this is not the solution I am looking for.

The files are saved in Azure File storage and can be linked via a URL’s like

\\account_name.file.core.windows.net\documents\20210411_214000_IMG_1629.jpg

Problem is the authentication.


I asume a proxy mechanism will be required to make this possible within the Thinkwise platform

 


Hi Harm,

Does this help you out?: Grant limited access to data with shared access signatures (SAS) - Azure Storage | Microsoft Docs

This can help with the authentication.


I think most ideal would be to have the possibility of making use of the ImageHandler in reports


Last thing I can come up with is using the following: ImageHandler ashx in Image Control SSRS (microsoft.com) . As long as the ImageHandler can find the image, from an URL(Azure) with the necessary authentication by using SAS for example, it should work I think. 

Some more info that might help: Improving the previewer experience | Thinkwise Community (thinkwisesoftware.com)


Hi @Harm Horstman

Did my previous answers help you out or have you found another solution?


Mark, 

It must be possible to open access images stored in Azure files storage by using SAS keys. But it would be nice if reports could use the same method as used in the Thinkwise application, that will make it more robust and easier to maintain, especially in a multi tenant scenario.

Maybe the SAS token could be forwarded as parameter, when a report is executed by the application.

 


Hi @Mark Jongeling ,

I still have not found a solution for showing images which are saved in Azure in a SSRS report.

Using the ImageHandler with the instructions given bij Jasper in this document, does not work. Ik guess it is a authentication problem.

Are there any new development that make this possible?

 


Hi Harm,

Another option might be to pass the image's base64 data through a report parameter:

http://www.jamesandchey.net/sql-server-reporting-services-how-to-pass-an-image-via-a-report-parameter-to-ssrs/

However, I have never tried that myself and don't know how that works out with larger images.


Reply