Yes, it is still an issue. The problem is in the NuGet package. If this isn't the place to report problems in code, could you please point me to the proper place for a bug report?
Microsoft.ReportingServices.ReportViewerControl.WebForms version 150.1404.0 returns invalid HTML for Reserved.ReportViewerWebControl.axd?ResourceStreamID=Blank.gif
The HTML returned by the reporting services viewer is missing the " at the end of the src attribute. It's resulting in:
<img src="/Reserved.ReportViewerWebControl.axd?Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=9bd48e896cff4dacbf5f8e7eef2e43bc&Mode=true&OpType=ReportImage&ResourceStreamID=Blank.gif ALT="Blank image"/>
This is causing the ResourceStreamID parameter to get the value "Blank.gif%20ALT%3D" instead of just "Blank.gif" which is resulting in a 404 error.
I'm using the Microsoft.ReportingServices.ReportViewerControl.WebForms package, version 150.1404.0 (the latest).
I'm not sure if it matters, but I'm rendering a report in local mode.
4 answers
Sort by: Most helpful
-
-
Alan Waiss 31 Reputation points
2020-12-08T15:43:51.227+00:00 For anyone else with the same issue, until Microsoft gives us a proper fix, I have a potential workaround. It's messy, though, because it looks like the HTML string is composed by the rendering engine, then sent to the HtmlTextWriter in one big chunk.
In your .aspx.cs:
protected override void Render( HtmlTextWriter writer ) { if( Page.IsPostBack ) { writer = new HtmlTextWriter_Fix( writer.InnerWriter ); } base.Render( writer ); } class HtmlTextWriter_Fix : HtmlTextWriter { public HtmlTextWriter_Fix( TextWriter writer ) : base( writer ) { } public override void Write( string s ) { if( s.Contains( "ResourceStreamID=Blank.gif ALT=\"Blank image" ) ) s = s.Replace( "ResourceStreamID=Blank.gif ALT=\"Blank image", "ResourceStreamID=Blank.gif\" alt=\"No content" );//[awaiss] The length has to match or the resulting content won't be parsed correctly (not sure why) base.Write( s ); } }
-
Davin Mickelson 121 Reputation points
2024-03-19T14:51:59.7+00:00 I believe this bug has been around for 20 years now. It was not a problem with IE but is currently a problem with Edge, Chrome, Firefox, and Safari. Even further, I understand it even came along with the codebase with the newer Power BI Server for the classic-style paginated reports. These are reports created with the Power BI Report Builder. I believe these reports also use an RDL-derived language.
It's a bug with the Line control. The Line control will display broken images before and after the line unless an InterationID is tacked onto the end of the URL, like this:
&IterationId=0
A report dev could switch out the used Line for a different control and add a border to one side to simulate a line.
Check out the article AND the comments here:
https://obscureproblemsandgotchas.com/uncategorized/ssrs-report-viewer-control-broken-image/Good luck.
-
ZoeHui-MSFT 37,671 Reputation points
2020-10-23T02:49:29.777+00:00 Hi @Alan Waiss ,
I'm not familiar with develop.
I did some online research for your reference, hope it will be helpful to you.
https://stackoverflow.com/questions/13498696/reportviewer-showing-broken-images-in-chrome
You may also raise the question to this forum for further help.
https://forums.asp.net/191.aspx/1?SQL+Server+Reporting+Services
Regards,
Zoe
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.