How to display image using Image control inside a table dynamically?

狂风中的少年 提交于 2019-12-13 03:39:19

问题


I have the below

and I would like to display the images using Image control inside a table dynamically. This is what I have tried

but the result is

so there are two things to be done

a) As can be figured out that I have chosen Mime Type as "images/png" (first image in png). It can be a mix of images/jpge or /png also

b) Why the images are not displaying ? where I am going wrong ?

The table schema is presented below

create table tblImageTest(Id int, EmployeeName varchar(100), CancellationImage varchar(100))
insert into tblImageTest values(1, 'emp1','1.PNG')
insert into tblImageTest values(2, 'emp2','2.jpg')
insert into tblImageTest values(3, 'emp3','3.jpg')
insert into tblImageTest values(4, 'emp4','4.jpg')

and the Stored Procedure also

alter procedure usp_imagetest
as
begin

select *,CancellationImagePath = 'F:\imagefolder\' + CancellationImage 
from tblImageTest

end

N.B.~ We can't store the images in the database as Blob. That's the limitation .Only image path is available.

Edit

This is the result after I deployed in browser


回答1:


I just tried this out locally.

b) Why the images are not displaying ? where I am going wrong ?

I think you don't have to select Database as Image source rather External reason.

Edit: You will have to add file:// in front of your Image path.

https://social.technet.microsoft.com/Forums/Lync/en-US/713f3dcd-d153-40a7-8593-154bef95ed5a/adding-image-from-external-path-in-ssrs?forum=sqldatawarehousing

Reason:

It depends on the value in the Image field. If it is a VARBINARY(MAX) data type value, then we can select Database as the image Source. If it is a string of the image URL, then we should select External as the image Source.

SSRS displaying image from database



来源:https://stackoverflow.com/questions/58762591/how-to-display-image-using-image-control-inside-a-table-dynamically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!