While reviewing the 100+ reports within Endpoint Insights, I ran across an issue where reports in SQL Server Reporting Services (SSRS) 2019 would display a missing image box (see screenshot below). When I tested the same reports within SSRS 2016 or lower, and additionally in Visual Studio and Report Builder, I didn’t see this problem. What was happening? Why was I getting missing images within my dashboards? This blog post will explain what the issue is and the solution(s). Yes, there is more than one solution.
Missing Image Box in SSRS 2019
I’ll show you what I’m talking about in the screenshots below.
See the missing image box (purple arrow)? Below, you’ll see the same report within Visual Studio (red arrow). There is NO image missing or displayed when the report is previewed.
I’ll save you the trouble of not having to read the WHOLE blog post just to find the solutions. The simplest solution is to upgrade SSRS to at least the 15.0.1102.897 file version in the SSRS 2019 April 2021 edition. It might be fixed with an earlier version, but it is fixed for sure in this version.
What is the Problem?
There is a long back story as to what I did to track this down and all the research that I did to solve this issue, but I will “cut to the chase” and go straight to showing you the problem.
I right-clicked on the broken image and selected the Copy image link. Next, I pasted the link in a new tab and accessed the page.
This gave me a 404 error. Great, but why was this only happening in SSRS 2019? After reviewing the URL, I discovered that the answer is within the URL itself. Near the end of the URL, it said: &OpType=ReportImage&ResourceStreamID=Blank.gif%20ALT=. This is the important part of the URL: ResourceStreamID=Blank.gif%20ALT=. Notice the text after Blank.gif? I removed that text from the browser’s URL and tried accessing the image again.
Wow, what a great image. 😊 Now that you know what the problem is, how do you fix it?
My first thought was that I would need to do something similar to the fix described in this post, https://askgarth.com/blog/chrome-browser-and-ssrs-reports/. I tested the website within Internet Explorer (non-Chrome version) and the bad URL worked in IE. I had to keep digging.
Solution(s) to Missing Image Box in SSRS 2019
There is not a lot of information out there on this exact issue. There are a number of solutions that are close, but they are NOT for this specific problem. Most of them involve editing the Cascading Style Sheets (CSS) or editing the global.asax file and using the URL rewrite to append the IterationID option. None of these will work, but it got me thinking. This led to the idea that you could use the URL rewrite option to strip out the ALT= and the hex characters.
Off I went to work on creating a solution based on the URL rewrite. I almost had it doing everything that I needed after a far too long time of “learning” how the URL rewrite option works. The key word in that last sentence is “almost.” Then, it suddenly hit me. Are we running the latest version of SSRS? I quickly discovered that we were NOT, so I applied the latest SQL Cumulative Update (CU) to the most recent version. Unfortunately, this didn’t solve the problem, but then I remembered that SSRS is now stand-alone. Next, I looked for the latest SSRS 2019 download and applied it. For good measure, I rebooted the server to make sure that everything was applied correctly before testing. Everything worked as expected and the missing image box was gone!
I’m sure that I could have gotten the URL rewrite to work, but before going to all that trouble, first, make sure that you are using the latest version. If that doesn’t work, then fall back to the URL rewrite option. If you have any questions, please feel free to contact me at @GarthMJ.
See how Right Click Tools are changing the way systems are managed.
Immediately boost productivity with our limited, free to use, Community Edition.
Get started with Right Click Tools today: