none
Reportviewer constantly refreshing

    Dotaz

  • I'm setting up my first test of using Reportviewer. All the application does is grab some data from a database, load it into a dataset and they populate a simple report with the datatable. The problem is when the report displays, it keeps displaying the message "Report Being Generated" and redisplaying the report. Its flashing about once a second. I've looked through all the viewer propertys and I don't see anything out of line.

    Any suggestions?

    Thanks,
    Bernie
    9. ledna 2010 3:37

Všechny reakce

  • The "Report is Being Generated" message is displayed when the report viewer is first processing the report.  It's not completely clear from your description what is happening, but I wonder if you are performing an operation in your page during each postback that is causing the viewer to treat the report definition as having changed and therefore restart report processing each time.  Are you setting any properties on the viewer after the LoadViewState event, such as during OnLoad?  Doing so might cause the viewer to think the definition is changing and therefore abort the previous rendering and start a new one, with a new instance of the wait message.  You might consider moving such code to OnInit.

    Additionally, which version of the ReportViewer are you using?  I'm assuming you are using the ASP.Net version of the control and not the winforms version.

    • Navržen jako odpověď Seamus 26. ledna 2011 11:37
    11. ledna 2010 6:08
  • In Report Property checkOut Autorefresh Option.
    13. ledna 2010 9:46
  • For me, I had the same issue and the problem was simply that I was setting up custom credentials on Page_Load. When the report has no parameters there's a postback and the credentials we being set again and so it started to render the report again resulting in a constant refresh.

    I moved the code to OnInit and that resolved the issue.

    Also, if the report had parameters, the symptoms were different. In this case, the report body did not render at all and the parameter toolbar would refresh with the parameter value missing.

    Again, moving code that modifies the report viewer control out of the Page_Load resolved the issue.

    26. ledna 2011 11:41
  • Seamus,

    Thanks for sharing this.

    I was having the same problem. I just moved the code from Page_Load to Page_Init page method. This solved the problem.

    All the best.


    Leniel Macaferi http://leniel.net
    30. června 2011 16:59
  • Hello there,

    you can put the code to generate the report inside

    if (!IsPostBack)

    {

                    //fn to generate your report

    }

    Regards

    29. listopadu 2011 12:37
  • I also had the same problem.  However, mine was caused by another issue. 

    I tried moving the code from Load and that did not help.

    What ended up solving my refresh issue (mentioned by user Arshika) was the Property AutoRefresh in my .rdlc file.  AutoRefresh was set to 1, which automatically refreshes the report every second when rendered in HTML.  I set this property to 0 and it no longer AutoRefreshed. 


    29. února 2012 17:09
  • I was noticing the same issue today, and your submission fixed it.  Thanks.

    7. června 2012 17:46
  • Thank you very much.
    9. května 2013 15:05
  • I just solve this $#it putting the method in the pageload using a if ! ispostback verification.

    My gosh, reportviewer on vs2012 is the worst ever made. Just going back to 2005/2008.

    Aldo Costa.

    Someday visit my blog about c#.

    http://aldocostasantos.wordpress.com

    15. srpna 2013 14:30
  • This is so weird! it happens on the client side but your solution works. 

    Anyways I am glad it worked. Thank You!


    MCITP: Business Intelligence Developer 2008, MCITP: Database Developer 2008, MCITP: Database Administrator 2008, MCPD: Enterprise Application Developer 3.5, MCTS: SharePoint 2010, Configuration Charter Member, MCTS: .NET Framework 3.5, Windows Workflow Foundation Applications, MCTS: Microsoft Windows Vista: Configuration, Microsoft® Certified Trainer 2010

    10. června 2014 5:13