.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Cannot Display Image in Report

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

 I have a report using an image control that needs to display an image inside subfolder "Images\InstitutionLogos\".

On properties of image control i have the following properties set:

MIMEType= "image/png"

Source      = Database

Value        ="\Images\InstitutionLogos\" +Fields!InstitutionID.Value+".png"

Inside subfolder "Images\InstitutionLogos\" each image is named with a number which represents Fields!InstitutionID.,(ex, 1.png, 2.png, 10.png)

However, when i run the report the image just displays an X, what am i missing?

View Complete Post

More Related Resource Links

Can't display an image from the database



My database has a products table that has images stored in a varbinary(MAX) column.

I'm trying to display product information in a repeater and trying to display the images as well by using a GenericHandler class but I can't get the image to show up in my page.

Here is my Handler.ashx class:

Public Class Handler
    Implements System.Web.IHttpHandler

    Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest

        '== Set up the response settings
        context.Response.ContentType = "image/gif"
        context.Response.BufferOutput = False

        Dim id As Integer = -1
        Dim stream As Stream = Nothing
        If Not String.IsNullOrEmpty(context.Request.QueryString("id")) Then
            id = context.Request.QueryString("id")
            stream = GetImage(id)
        End If

        Const buffersize As Integer = 1024 * 16
        Dim buffer(buffersize) As Byte
        'byte[] buffer = new byte[buffersize];
        Dim count As Integer = stream.Read(buffer, 0, buffersize)

        While count > 0
            context.Response.OutputStream.Write(buffer, 0, count)
            count = stream.Read(buffer, 0, buffersize)
        End While


Session problem with display of image in row of reportviewer


Hello techies...

I am new to this sql reporting service. But anyhow by surfing I am able to bind the report but i was stuck in image display.

Anyways, i also managed that. But the real problem is whenever i was keeping a image control in rdlc report i was having session prob. If i remove the image control then as usual report works fine.

Please suggest me some solution.... either for session problem or for image display. I am keeping the image name in database but for binding the rdlc report i am using a store procedure which return the path (static) concating with the image name(kept in database).

Hope to find a solution .....

How to display related tables in one crystal report and how to link this report with combobox?


Hi! I want to display a crystal report in my vb.net application. Suppose I have tables named student details, student marks, student address, etc... Now if I want to display all these details (fields of all tables) in one crystal report (with page breaks if necessary) then how will I achieve it. I will be providing a combo box in my application that contains list of student names. How can I link this combo box with the cystal report to dynamically display report for different student on selected index change of combo box? Help me friends. An example would be appreciable.

Display multivalue data in crystal report


i Want to show data for single employee like this like this

Emp Id : xyz

Emp Name : abc


Child name      Date of birth     education

abc                     12/12/2000    o levels

How To display image in GridView as hyperlink


Hello Everyone 

Could someone please help me with a little issue....

I was able to save the image in the database as binary....... but now i don´t know how to display it in the GridView as a hyperlink.

I´ve read something about ImageField..... I´d appreciate any help .


Microsoft Report Viewer control to display data on one page


Hello everyone,

I am wondering if the Microsoft Report Viewer control allows for display changes.  Say for instance a user wants would like to see all the data requested then another time would like to toggle thru the pages of infomation.  So does anyone know if the control allows for display changes from complete view to paginated viewing.  I am using MS VS 2008 with ASP.NET 3.0.  Thanks for your response.


Display image icon in HyperLinkField of Gridview

 Hello everyone! Can someone please tell me how to display an image in a HyperLinkField of a gridview?  Instead of words, I just want to show a simple little icon that can be clicked on and pass a query string to the next page.  The first hyperlink field I have set up works perfectly and passes the querystring to the next page.   The second hyperlinkfield is my attempt at showing the image but it's giving me a squiggly and telling me "the element img cannot be nested within the element hyperlinkfield" I got this technique from this brief article   - I would like to accomplish exactly what it says it is suppose to do. Thanks!   <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="clientID"> <Columns> <asp:BoundField DataField="clientFirstName" HeaderText="First Name" /> <asp:BoundField DataField="clientLastName" HeaderText="Last Name" /> <asp:HyperLinkField HeaderText="More Info" Text="View more info..." DataNavigateUrlFields="clientID" DataNavigateUrlFormatString="Cli

Display XAML workflow image in browser and hightlight the current Activity

I have a requirement in project to display the XAML workflow in browser as image like the Visual studio designer displaying and it should Hightlight the current activity in workflow.  Please guide me on this.rajeevkalyan

IE cannot display the webpage during report execution

Hi. I have a problem with a report having some T-SQL and MDX queries. When I execute it during the working hours I have an error about that Internet Explorer cannot display the web page, but in the other hours the execution is completed successfully. I have a look inside RS log but I cannot find any errors; no timeout is set about report execution inside the Report Manager. Any ideas to solve this issue, please? Many thanks

T-sql help !!!!! in order to display those extra rows in report....

SiteName SiteID RptSeq     ReportLabel Amount ReconYear     ReconMonth SanAntonioTX 43    1        Aging Prior Month 4763943 2010     8 SanAntonioTX 43 2   Invoices 1542323 2010      8 SanAntonioTX 43 3 Credit Memos -8081.31 2010      8 SanAntonioTX 43 4 Cash Collected - Invoices and Payment on Account -1883460 2010      8 SanAntonioTX 43 5 Katz I/C Payments -174310 2010      8 SanAntonioTX 43 6 NSFs -250 2010           8 SanAntonioTX 43 8 Aging Current Date Selected 4245716 2010      8 Hi My table has these values I need a row where it takes the sum of amount where rptseq <> 8 and rest of ther columns will be same and report label would be SUmOfAmount and there should be another column which wuld be amount of new added row - last row amount where rptseq =8 so these rows i need how is it possible..... please its urgent !!!!!!! if anyone needs extra description please feel free to ask me...

display image in gridview - unlucky with tutorials

I'm trying to display images in a gridview, but after following the examples of maybe 7 different tutorials I still haven't succeded. There are always some things that go unexplained. My latest attempt is according to this tutorial:http://www.aspdotnetcodes.com/Insert_Images_Database.aspxProblem No1: what exactly should I write in my ashx-file? Following the example in the tutorial this is the code so far:<%@ WebHandler Language="C#" Class="ImageHandler" %> using System; using System.Web; using System.Configuration; using System.Data.SqlClient; public void ProcessRequest (HttpContext context) { SqlConnection myConnection = new SqlConnection("DBPejganConnectionString1"); myConnection.Open(); string sql = "Select Image_Content, Image_Type from ImageGallery where Img_Id=@ID"; SqlCommand cmd = new SqlCommand(sql, myConnection); cmd.Parameters.Add("@ID", SqlDbType.Int).Value = context.Request.QueryString["id"]; cmd.Prepare(); SqlDataReader dr = cmd.ExecuteReader(); dr.Read(); context.Response.ContentType = dr["BildTyp"].ToString(); context.Response.BinaryWrite((byte[])dr["BildData"]); dr.Close(); myConnection.Close(); }Please give me a hint (or rather the answer) on what's missing. The rest of the problems comes later... :)

Displaying Image stored in rtf format in access database displaying it on crystal report

Hello, I'm working on a C# project combined with "Crystal Reports 10". When a user inserts something in a "TextField" in my C#-Program, it's saved  as RTF-code (Bolt,Pictures,Underlined,....) to a database.. So if they  reopen it in my "C#"-program they're able to see what they've entered  including their pictures .... But when I created a "Crystal Report"-file and combined it with the same  database used in my "C#"-program, it only show the formatted text and not  the pictures or images... Is there a way to show the "Picture" or "Image" they've inserted in RTF-code  ??? When I copy the code from the database in a simple Text-File and rename  it too "Test.rtf", it wil open correctly in word (with picture and  everything else)... So I hope there is a way to get the picture, Cz it's rather important  they've got a picture of the product they wanna print ...

How to Display Binary Image in RDLC in asp.net?

Hi, I want to display Binary image from Database in RDLC. Can some one help me out.   Thanks in advance..  

Snapshot report with matrix sometimes does not display data ... rerun report and it does

Hi All, I am having a strange problem with a snapshot report that is scheduled through Report Manager and runs once a day at approximately 18:30 each evening. The report contains a column chart with a textual category, numeric data, and a date series. Above the chart, is a matrix containing the value of the last bar in each series, and the average value of all bars in the series.  Here's a screen capture of what the report looks like: http://img832.imageshack.us/img832/185/wipu.png The problem is that sometimes the matrix is missing.  The chart still displays properly and all the data is correct.  If I rerun the report manually, and save a new snapshot, the matrix re-appears. For the past 6 months this report has been running flawlessly.  In the past 3 weeks, the problem has occurred twice.  I don't know why. Why would the matrix disappear?  What is causing this, and how can I fix it?  Any ideas? I'm using SSRS 2008. Thanks in advance for any insights. Regards, --DanDJAnsc

MVVM - race condition causing image to not display

Hi, We are using MVVM pattern at work for a window that fetches data from a web service and then displays the data. The data is displayed in tabs where each tab displays a title (string) and a chart (image). There are four tabs and whatever tab that is selected to be displayed first fails to display the image. The title gets displayed and this happens asyncrhonously so you will see no title and then when NotifyPropertyChanged fires you see the title but not the image. All the tabs that are not displayed by default work as expected and show the image. And you can change which tab is not displayed and the new tab that is displayed by default will also fail to show the image. Any help greatly appreciated. Code Getting Data The code as it is shown below works. However whenever I try and use the ThreadPool to GetNineMonthsOptionData the image for that tab doesn't display. Another interesting thing is that if I use the thread pool and then put a Thread.Sleep(2000) call right after it works. So there seems to be a race condition at work here. public void LoadOption(string symbol) { _symbol = symbol; // TODO: Team A - Change to use background thread for ninemonth data also and determine // if dispatching is necessary GetNineMonthsOptionData(); //ThreadPool.QueueUserWorkItem( // (o) => // { // GetNineMonthsOptionDa

embedding flash image in SSRS report 2008

HI ALL, I have image "Shockwave Flash Object" and i want to upload it into SSRS report ,but when i select the report into ADD Image it shows it will not support the format,suggest how to upload the same image into the SSRSreport 2008   Regards Amit

Display current time (live?) on report?

Is it possible on a report to display a clock showing the current time, ticking? Or, is it possible to display a static picture of an analog clock? I have the current time with an expression, but would love to have it updating real time. Any luck with javascript or anything?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend