{"id":142,"date":"2010-05-07T01:23:02","date_gmt":"2010-05-07T01:23:02","guid":{"rendered":"http:\/\/jcrawfor74.wordpress.com\/?p=142"},"modified":"2024-09-27T17:58:25","modified_gmt":"2024-09-27T07:58:25","slug":"ssrs-sql-server-reporting-services-how-to-reference-an-external-image-hosted-on-the-report-server","status":"publish","type":"post","link":"https:\/\/ntsblog.homedev.com.au\/index.php\/2010\/05\/07\/ssrs-sql-server-reporting-services-how-to-reference-an-external-image-hosted-on-the-report-server\/","title":{"rendered":"SSRS SQL Server Reporting Services &#8211; How to reference an external image hosted on the report server"},"content":{"rendered":"<div id=\"ntsbl-3048380350\" class=\"ntsbl-before-content ntsbl-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-6288941070289539\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:inline-block;width:728px;height:90px;\" \ndata-ad-client=\"ca-pub-6288941070289539\" \ndata-ad-slot=\"9356781486\"><\/ins> \n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>\n<p>Ok,<\/p>\n\n\n\n<p>I needed to do this the other day, after an hour or so I finally got it.<\/p>\n\n\n\n<p>Issue, I have an images directory that is deployed to the report server with my reports, It is hidden in the tile view.<\/p>\n\n\n\n<p>The problem, how to insert an image into my report that references the images directory hosted on my report server.<\/p>\n\n\n\n<p>Well after a while of struggling with it I noticed this little perl of information in the warnings for my report;<\/p>\n\n\n\n<p>[rsWarningFetchingExternalImages] Images with external URL references will not display if the report is published to a report server without an UnattendedExecutionAccount or the target image(s) are not enabled for anonymous access.<\/p>\n\n\n\n<p>So to make this work do the following<\/p>\n\n\n\n<p>1. Setup an unattended execution account, (See the Execution pane in the Reporting Services Configuration Tool)<br>\n2. <strong>** Very Important **<\/strong> Ensure &#8220;everyone&#8221; has browse access to the images folder, (or confirm that the unatteneded execution user has access to the images folder)<br>\n3. In your report set the URL of your image with an expression like the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">=IIf(Globals!ReportServerUrl is nothing,\n\"http:\/\/localhost\",\nGlobals!ReportServerUrl + \"?\") + \"%2fimages%2fimage.png\"<\/code><\/pre>\n\n\n\n<p>Two things of interest in this code:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>There IS a ? after the http:\/\/\/ReportServer path<\/li>\n\n\n\n<li>This expression uses the localhost when in the IDE preview window and the full reportserverUrl when deployed to a server. I didn&#8217;t want to hard code localhost for a production deployed report<\/li>\n\n\n\n<li>I am running a IIS server on my own machine port 80 with the images matches what is deployed to production<\/li>\n<\/ol>\n\n\n\n<p>And now it all works both in the IDE and the deployed report.<\/p>\n\n\n\n<p>Cheers<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ok, I needed to do this the other day, after an hour or so I finally got it. Issue, I have an images directory that [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[11],"tags":[],"class_list":["post-142","post","type-post","status-publish","format-standard","hentry","category-reporting-services"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts\/142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/comments?post=142"}],"version-history":[{"count":0,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts\/142\/revisions"}],"wp:attachment":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/media?parent=142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/categories?post=142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/tags?post=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}