Reputation: 26498
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
Upvotes: 0
Views: 75
Reputation: 5531
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.
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
Upvotes: 1