The image path is stored in the SQL Server 2008 database. On my RDLC report, I have a image field. I have set this field to get the image path from the database column in the da
For display the external image in RDLC report,
You have to set EnableExternalImages to true.
The file path you are using should be absolute path. The path you are using should be in the form of "file:///C:/RDLCTest/TestImage.png".
Also, you have to set the MIME type for the image control. Each file type has its own MIME type. Refer http://webdesign.about.com/od/multimedia/a/mime-types-by-file-extension.htm for list of MIME types based on file extension.
The problem was that I did set the image source property of the image control on the report to "database", which is incorrect. Because the image is not saved in the database, but only the path to it. So I changed it to "External" and walah! It works like a charm. Thank you all for your help.
reportViewer.LocalReport.ReportPath = @"Report Path";
reportViewer.LocalReport.EnableExternalImages = true;
ReportParameter parameter = new ReportParameter("ImagePath", imagePath);
ReportParameter[] param = new ReportParameter[1];
param[0] = parameter;
reportViewer.LocalReport.SetParameters(param);
reportViewer.RefreshReport();
http://www.aspsnippets.com/Articles/Dynamically-add-and-display-external-Image-in-RDLC-Report-from-code-behind-in-ASPNet.aspx