I'm trying to add an image to a report. The image src url is an IHttpHandler that takes a few query string parameters. Here's an example:
<img src="Image.ashx?item=1234567890&lot=asdf&width=50" alt=""/>
I added an Image to a cell and then set Source to External and Value to the following expression:
="Image.ashx?item="+Fields!ItemID.Value+"&lot="+Fields!LotID.Value+"&width=50"
But when I view the report, it renders the image html as:
<IMG SRC="" />
What am I missing?
Update
Even if I set Value to "image.jpg" it still renders an empty src attribute. I'm not sure if it makes a difference, but I'm using this with a VS 2008 ReportViewer control in Remote processing mode.
Update
I was able to get the images to display in the Report Designer (VS 2005) with an absolute path (http://server/path/to/http/handler). But they didn't display on the Report Manager website. I even set up an Unattended Execution Account that has access to the external URLs.
The embedded image will always be available to that report and listed in the image manager panel. Follow these steps to add an image to an SSRS report using the image manager panel. Click the image manager panel icon in the configuration panel. Click ADD IMAGE. Browse for and select an image in the local disk and then click Open .
Steps to add a hyperlink in SSRS report: In report design view, right-click the text box, image, or chart to which you want to add a link and then click Properties. 2. In the Properties dialog box, click the Action tab and select URL.
All that’s left is to do is add the new column that will house the dynamic image. -Chosen the images and they are ready to be imported. First, import the images. Second, add a column. Third, update the row properties. Ensure the Report Data window is open, right-click on the Images node and select Add Image…
Since images cannot be built dynamically in SSRS with an RDL file, we will use our .NET HTTP RESTful application to serve dynamic images to the SSRS RDL, but the decision of what image is to be served will be made based on the parameter supplied by RDL. How?
I have a SSRS Report that displays the information about the countries of the users of a site that we support at work. This is based on the IIS log data. On this report, in the first column of the table is an image field that holds a small .gif of the flag for each country. I was running into the same exact issue described in the question above. The path to the external image was calculated in the report’s query based on the country code. I initially setup the URL to point to something like http://www.mystaticcontent.com/fotwimg/us.gif for a United States flag and so forth. All I got was a red X broken image displayed in the report. Then I found this MSDN article that shined some light on the issue for me.
This is what I did with the report to make it work:
Have you tried using a fully qualified path?
http://<servername>/images/image1.jpg
More Info
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With