priyanka.sarkar
priyanka.sarkar

Reputation: 26498

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

I have the below

enter image description here

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

enter image description here

but the result is

enter image description here

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

enter image description here

Upvotes: 0

Views: 75

Answers (1)

AnkUser
AnkUser

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.

enter image description here

enter image description here

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

Upvotes: 1

Related Questions