How to add an image to an SSRS report with a dynamic url?

Posted by jrummell on Stack Overflow See other posts from Stack Overflow or by jrummell
Published on 2009-12-02T16:58:03Z Indexed on 2010/03/26 4:23 UTC
Read the original article Hit count: 383

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.

© Stack Overflow or respective owner

Related posts about ssrs-2005

Related posts about ssrs-reports