SSRS ReportViewer Web Control - how not to show "WaitControl" when rendering like Async?

I use the latest (2010) ReportViewer Web Control in an ASP.NET 4 project. My client wants me to suppress / hide the initial “Download” message that appears when the report is received.

Yes ... 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 with AsyncRendering = False, you can set the WaitControlDisplayAfter property to a ridiculously long value.

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

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

(The question that asked me was that they wanted to see a cached copy of the report when it downloads updated information - any contributors to this?)

Thanks Jaans

+4
source share
3 answers

I found a way to hide a downloadable message by manipulating the DOM with jQuery. Adding the following script to the page using 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> 
+6
source

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

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

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

+4
source

I also recommend the two above codes because they are efficient and not suitable for use. But if that doesn’t help, use this one. Add the function below and call it when the pages load.

  private void HideLoadImage(Control ReportViewer) { foreach (Control c in ReportViewer.Controls) { if ((string.Compare(c.ID, "AsyncWait") == 0)) { c.Visible = false; } if (c.HasControls()) { HideLoadImage(c); } } } 
-1
source

All Articles