none
RefreshReport flicker RRS feed

  • Question

  • Ultimately I want a line graph to monitor the value of an object's property over time in vs2005 and I want it to look good and not be a third party component.

    The report viewer seems to be the ticket and it works really well except that my WinForm app flickers in the area the reportviewer resides each time I call RefreshReport(). I am using a local report in this case. From what I've read, RefreshReport "causes all data in the report to be reloaded and rendered".

    How do I prevent the flicker from happening when RefreshReport() is called? Or is there another way to update what I see in the report viewer after I've updated the data source object?
    Tuesday, April 21, 2009 9:28 PM

Answers

All replies

  • First thing, certainly your application reloads the data and refreshes report very quickly.
    That's good as per as performance is concerned but it may be a Flickering for an eye.

    Well, when the GUI of Screen changes very quickly for human eye. That can be a Flickering for human eye.

    So, I have a suggestion to give human eye a feel of smooth images so that it does not consider it as flickering.

    Try something like:

                    System.Threading.Thread.Sleep(1000);
                    this.reportViewer1.RefreshReport();
                    System.Threading.Thread.Sleep(1000);

    If it suits as per your requirement, it's well and good.


    Regards, Lakra :) - If the post is helpful or answers your question, please mark it as such.
    • Proposed as answer by Abhijeet Lakra Wednesday, April 22, 2009 8:43 AM
    • Unproposed as answer by tackerman Monday, April 27, 2009 10:02 PM
    Wednesday, April 22, 2009 8:42 AM
  • Aby Lex, did you try your own solution?

    I should specify that I am doing "real time" monitoring here. For example graphing the bits per second received on a network interface and updating the report every second.

    Already the test I'm doing does a 1 second sleep, generates a couple random numbers to graph and then uses the RefreshReport to display them.

    I should be clear that I am not running any sort of database queries and I'm simply testing the use of the ReportViewer against a plain old object.  I already specified to not display "Generating Report" while RefreshReport() executes. I also tried extending report viewer so I could make sure it was "double buffered".

    I just want some nice graphs that are ready to use with vs2005. I know there are third party ones available but I'd like to avoid them.
    Monday, April 27, 2009 10:16 PM
  • Hi,
    If you want do something real time and want some nice graph, you should consider using the Microsoft Chart Controls for .NET Framework 3.5  http://www.microsoft.com/downloads/details.aspx?familyid=130F7986-BF49-4FE5-9CA8-910AE6EA442C&displaylang=en.

    It comes in both ASP.NET and Windows Forms controls.

    And here is a link to my colleague's blog that has the links to info about the controls:  http://blogs.msdn.com/seanboon/archive/2008/10/25/microsoft-chart-controls-for-net-framework-3-5-released.aspx

    Thanks.

    Stella Chan
    Lead Program Manager
    SQL Server Reporting Services
    Tuesday, April 28, 2009 5:54 PM