问题
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&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=712a96453ecc4eb89b71439a5477d6c6&Mode=true&OpType=ReportImage&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