Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS ReportViewer Web Control - How to not show the "WaitControl" at all when rendering as Async?

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

like image 472
Jaans Avatar asked Dec 22 '22 00:12

Jaans


2 Answers

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>
like image 169
Joe Camp Avatar answered May 16 '23 09:05

Joe Camp


Starting from Joe Camp's answer, the following works for me. I added this entry to the application's CSS file:

div[id$='AsyncWait_Wait']
{
    display: none !important;
    visibility: hidden !important;
}

Tested working in IE8, IE9, Chrome 21, FF10, FF15, and Safari (version 5-ish, iPad3 iOS 5.1.1).

like image 25
leqid Avatar answered May 16 '23 08:05

leqid