SSRS ReportViewer Web Control – How to not show the “WaitControl” at all when rendering as Async

asp.netreporting-servicesreportviewer

I'm using the latest (2010) ReportViewer Web Control in an ASP.NET 4 project. My client wants me to suppress / hide the initial "Loading" message that gets displayed while the report is being fetched.

Yeah… I know… why hide information that tells you what's going on? But, the client wants what the client wants.

I know that if you use the report viewer control with AsyncRendering=False that you can then set the WaitControlDisplayAfter property to a ridiculously long value.

Unfortunately, I need to have AsyncRendering=True (showing multiple reports on a type of Dashboard thingy). This (according to MSDN http://msdn.microsoft.com/en-us/library/microsoft.reporting.webforms.reportviewer.waitcontroldisplayafter.aspx see Remarks section) will mean that the "Wait Control" will always show. (Grr-r-rr!)

So the question is, how to I not show this control using async rendering?

(An aside question the client asked me, was that they wanted to see a cached copy of the report while it's loading an updated one – any takers on this one?)

Thanks,
Jaans

Best Answer

I found a way to hide the loading message by manipulating the DOM with jQuery. Adding the following script to the page with the reportviewer did the trick:

<script type="text/javascript">
    $(function () {
        var waitMsg = $("div[id$='AsyncWait_Wait']");
        waitMsg.wrap("<div style='display:none; visibility: hidden'></div>");
    });
</script>
Related Topic