本帖最后由 fuyun2000 于 2013-04-15 17:28:39 编辑

解决方案 »

  1.   

    应该是这个问题:
    Reports Never Stop Loading With VS 2010
    http://blogs.msdn.com/b/brianhartman/archive/2010/03/21/reports-never-stop-loading-with-vs-2010.aspx
      

  2.   

    Calling methods like SetParameters isn’t cheap.  Each call triggers a round trip to the report server.  So it’s a call you want to minimize anyway.  By only calling SetParameters during the initial GET request or only when parameter values have actually changed, you can improve the performance of your application and break the loop.  A simple check of IsPostBack before calling SetParameters is usually sufficient.不能调用SetParameters, 或者只调用一次SetParameters 
      

  3.   

    楼上大侠不行啊,我必须IsPostBack的时候什么都不做,连数据都不能添加才没问题,但是这个时候如果点击报表上的刷新按钮又没用了,因为刷新也是postback的,求救!!!
      

  4.   

    晕死报表的数据怎么是存在session中的,微软搞屁啊,难怪2008的时候还常内存溢出
      

  5.   


    呵呵,关键点在这第一句。
    if (!IsPostBack)
    {
                    ReportViewer1.ServerReport.ReportServerCredentials = new MyReportServerCredentials();
    }
      

  6.   

    我也遇到了这种问题,解决方法是:
     protected void Page_Load(object sender, EventArgs e)
            {
                if (!IsPostBack)
                {
                    ban();  
                }
            }
            public void ban()
            {
                pro_CityDataSetTableAdapters.CityTableAdapter city = new pro_CityDataSetTableAdapters.CityTableAdapter();
                DataTable dt = city.GetData();
                ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/Report1.rdlc");
                ReportDataSource data = new ReportDataSource("DataSet1", dt);
                ReportViewer1.LocalReport.DataSources.Clear();
                ReportViewer1.LocalReport.DataSources.Add(data);
                this.ReportViewer1.DataBind();
            }