Tiny boxes appear when rendering SSRS reports in HTML viewed from Chrome

柔情痞子 提交于 2019-12-10 21:20:05

问题


This this the current design of my report:

When I run it on different browser except for Chrome, it's looks almost ok (I have no idea why the HTML render is different from the expected result):

But in Chrome, it's a different story. Tiny boxes appear out of nowhere. How do I get rid of it?:


回答1:


It seems that the boxes are generated upon loading the page. It creates a gif image named "Blank.gif" here is the complete code when I entered 'Inspect Element':

<img src="/Reserved.ReportViewerWebControl.axd?Culture=1033&amp;CultureOverrides=True&amp;UICulture=1033&amp;UICultureOverrides=True&amp;ReportStack=1&amp;ControlID=712a96453ecc4eb89b71439a5477d6c6&amp;Mode=true&amp;OpType=ReportImage&amp;ResourceStreamID=Blank.gif"/>

I solved it by just creating a CSS style that finds img elements in the body that matches the source of that image element with "Blank.gif" and then hides it.

Here is my solution:

<style>
        body:nth-of-type(1) img[src*="Blank.gif"]
        {
            display: none;
        }
    </style>


来源:https://stackoverflow.com/questions/45454067/tiny-boxes-appear-when-rendering-ssrs-reports-in-html-viewed-from-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!