none
How to tell when a ReportViewer Control has finished processing the report? RRS feed

  • Question

  • I understand there is supposed to be a RenderingComplete event for the ReportViewer Control - I do not see this in the list of available events. 

    What I am trying to do is identify when the ReportViewer control has completed processing.  Also, can this information be passed on to a JQuery or javascript event?

    Basically, I want to show my own "report is processing" animation on the page until the report finishes rendering.  This is because the report height is somewhat large and you cannot see the report processing animation that shows in the middle of the ReportViewer control unless you scroll down on the page.  I want something visible at the top of the page so that my users don't think the report is hung up.  I am using VS2008 with SSRS 2008.

    Any suggestions would be appreciated.

    Monday, May 24, 2010 9:00 PM

All replies

  • VS2010 exposes a client-side ReportViewer JS object. You can hook up to the ReportViewer.isLoading property. There's sample code there that shows you how.


    Cephas Lin This posting is provided "AS IS" with no warranties.
    Monday, May 24, 2010 10:55 PM
    Moderator
  • I just double checked some code I wrote using RenderingComplete and it is definately there. What language are you using and do you have references to both Microsoft.ReportViewer.Common and Microsoft.ReportViewer.WinForms?

    Bernie

    Monday, May 24, 2010 11:25 PM
  • I am using VS2008 (as I mentioned in my post).  How do I access what you mentioned without VS2010 please?
    Monday, May 24, 2010 11:25 PM
  • VS2008 is a development environment. VB and C# are languages. What language are you using?

    Did you check your references?

     

    Monday, May 24, 2010 11:29 PM
  • My C# code hooked it like this;

    mrvMicrosoftViewer.RenderingComplete +=

     

    new RenderingCompleteEventHandler(RenderingCompleteEventHandler);

    and a method like this;

     

    public void RenderingCompleteEventHandler(object sender, RenderingCompleteEventArgs e)

    {

    // do something here ...

     

    }

    This is in C# in VS2008.

     

    Monday, May 24, 2010 11:31 PM
  • Hello BernieHunt,

    Sorry - my reply about the Visual Studio version was actually to Cephas Lin - I guess you posted right before I did and it got out of order.

    My client prefers VB to C# (although I do not).  I am therefore using VB as a language.

    I do have both of the references you mentioned: Microsoft.ReportViewer.Common and Microsoft.ReportViewer.WinForms, and I do not notice the event as an option in the ReportViewer properties (not sure it should show up there, but that's where I'm looking).  I am incidentally doing this in an ASP.Net web application rather than in WinForms.

    I would have tried to convert your code, but this is an area I am unfamiliar with....do you have suggestions for me?  I would try the DeveloperFusion site with its Convert C# to VB.Net page, but their site is currently not working.

    Thank you.

    Tuesday, May 25, 2010 12:01 AM
  • It looks like you might be out of luck with RenderingComplete.

    http://www.windows-tech.info/15/d45d3cf6fb34e4f0.php

    But then this says to use one, in relation to a webform.

    http://msdn.microsoft.com/en-us/library/ms251848(VS.80).aspx

    But I can't find reference to either actually being in Reporting.Webforms namespace.

    I don't think it exists in a Webform.

    Bernie

     

    Tuesday, May 25, 2010 12:27 AM
  • Well, maybe I could ask a different question then - is there a way to set the processing message on the ReportViewer control to show up at the top of the control instead of in the middle?
    Tuesday, May 25, 2010 3:04 AM
  • Sorry, thought you were using WebForms. My comment was about a VS2010 WebForms feature.
    Cephas Lin This posting is provided "AS IS" with no warranties.
    Tuesday, May 25, 2010 5:20 PM
    Moderator
  • Hello Cephalin,  no problems.  I actually AM using WebForms, but am using VS2008 rather than VS2010.  I don't have access to the feature you mentioned. Unless I can recreate it?

    I just wanted a simple way to show on the web page that the ReportViewer control was still processing, but put it at the top of the web page where the user would be more likely to see it instead of relying on the ReportViewer control to show that it was processing because the processing animation on this control isn't visible unless you scroll down the page.

    Thanks for trying.

    Wednesday, May 26, 2010 4:12 PM
  • Carolyn,

    Maybe there is a way to do this through user interface. What about making the report viewer smaller so they can see the processing animation while it's rendering. Put a button next to the report viewer that says "expand" or something like that. The button will resize the report viewer to a usefull size for them to view the report.

    Just a crazy idea, but it may work for you.

    Bernie

     

    Wednesday, May 26, 2010 4:25 PM
  • Bernie, that is an interesting thought.  I don't think my users would like the extra step - they would probably just prefer the wait period.  Way to go for being creative at least!  You're right about one thing, I may need to think outside the box a bit on this one since there is no built-in or easy option available!

    I appreciate your input.

    Carolyn

    Wednesday, May 26, 2010 4:41 PM
  • OK, now you've encouraged me so you get all the wacky ideas, hahaha.

    How about then the user requests the report, you give them a page with enough animation to keep the occupied. Render the report on the serverside and export to PDF. When that's done, redirect the user to the PDF file. I'm not sure of all the details on this, but I think it can be done. I'm a desktop developer so I may be missing something here.

    Bernie

    Wednesday, May 26, 2010 4:58 PM