Reporting Services 2005 Image Control and Image data type
Hi All, I've been trying to get a JPEG image out of an "image" field in a SQL Server 2005 database and display it in an image control on a report (SSRS 2005), and no matter what I try I get the dreaded box-with-red-x. After a lot of research I keep coming back to the same posts that say: - use expression "=System.Text.Encoding.Default.GetBytes(Mid(System.Text.Encoding.Default.GetString(Fields!Map.Value),79))"- use expression "=System.Convert.FromBase64String(Mid(System.Convert.ToBase64String(Fields!ImageFieldName.Value),105))", if the image originates in an en-us system.Neither work for me. Before that I was trying to display a PDF file of the same image, with the same result.It seems like this should be a routine, 10-secondtask that people do all the time. Does anyone have any suggestions?Thanks,crickb
January 1st, 2009 1:08am

.1.Drag the image control to Report.2. Make sure to select MIME Type= Image/jpeg3. Then Replace the Value property of image control manually by this:- "=System.Text.Encoding.Default.GetBytes(Mid(System.Text.Encoding.Default.GetString(Fields!Map.Value),79))"Means you should manully replace it.Hope it helps ~~ Mark it as Answer if you find it correct~~
Free Windows Admin Tool Kit Click here and download it now
January 1st, 2009 1:52am

Hi Sandeep, I had everything as you said except for GetString vs. GetBytes. Unfortunately the same result :-( But thanks, I have to knock off for the day and I'll look at it again on Monday.
January 1st, 2009 1:59am

I am facing the same issue, can anyone help me in this regard. I have a field of data type IMAGE and I want to use this field in my report. Can any one help. I have tried the above mentioned conversions but nothing works. Thanks in Advance.
Free Windows Admin Tool Kit Click here and download it now
December 1st, 2011 3:35am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics