{"id":7311,"date":"2014-06-07T02:24:12","date_gmt":"2014-06-07T02:24:12","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/06\/07\/how-to-add-an-image-to-an-ssrs-report-with-a-dynamic-url-collection-of-common-programming-errors\/"},"modified":"2014-06-07T02:24:12","modified_gmt":"2014-06-07T02:24:12","slug":"how-to-add-an-image-to-an-ssrs-report-with-a-dynamic-url-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/06\/07\/how-to-add-an-image-to-an-ssrs-report-with-a-dynamic-url-collection-of-common-programming-errors\/","title":{"rendered":"How to add an image to an SSRS report with a dynamic url?-Collection of common programming errors"},"content":{"rendered":"<p>I have this problem too..<\/p>\n<p>I have looked at the SSRS error logs, and the IIS server logs. Some findings:<\/p>\n<ol>\n<li>External images with URLs to static images work. (e.g. http:\/\/intranet\/site\/logo.jpg)<\/li>\n<li>I can add parameters to static image URLs and it still works. (e.g. http:\/\/intranet\/site\/logo.jpg?foo=1) The parameter will be ignored, and the image displays. This suggests that SSRS is not choking on the ?.<\/li>\n<li>If I link the external image to an ASPX page that returns a report with no parameters (e.g. http:\/\/intranet\/site\/image.aspx), it still doesn&#8217;t work.<\/li>\n<li>IIS logs show the report server requesting the image, and getting a 200 OK response.<\/li>\n<li>Report server logs show this:<br \/>\n<blockquote>\n<p>webserver!ReportServer_0-116!14cc!01\/09\/2012-12:20:29:: i INFO: Processed report. Report=&#8217;\/Path\/ReportName&#8217;, Stream=&#8221; ui!ReportManager_0-115!7b8!01\/09\/2012-12:20:29:: Unhandled exception: System.Web.HttpException: File does not exist. at System.Web.StaticFileHandler.GetFileInfo(String virtualPathWithPathInfo, String physicalPath, HttpResponse response)<br \/>\nat System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context) at System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously)<\/p>\n<\/blockquote>\n<\/li>\n<\/ol>\n<p>I wonder if SSRS is doing something boneheaded like adding the &#8220;correct&#8221; file extension before saving the file?<\/p>\n<p>i.e. something like (1) SSRS downloads \/Page.aspx, which supplies an image with Content-Type: image\/jpg; (2) SSRS saves this to a temporary folder with a filename like tempname.aspx.jpg; (3) SSRS looks for tempname.aspx to incorporate the image into the report; (4) Error<\/p>\n<p>I suppose you could test this by handling .jpg requests in code-behind&#8230; Unfortunately that&#8217;s beyond my ASPX skills at the moment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have this problem too.. I have looked at the SSRS error logs, and the IIS server logs. Some findings: External images with URLs to static images work. (e.g. http:\/\/intranet\/site\/logo.jpg) I can add parameters to static image URLs and it still works. (e.g. http:\/\/intranet\/site\/logo.jpg?foo=1) The parameter will be ignored, and the image displays. This suggests [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7311","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7311"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7311\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}