解决方案 »
- 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许
- SVN设置权限问题,怎么设置
- GridView分页功能上显示首页,上一页,下一页,末页,同时还显示页码的导航,请问如何做?
- 求教利用数字实现DataList分页
- 大哥,大姐帮帮忙,急需一个ASP简单查询功能的通讯录源代码,谢谢
- 在样控制textBox自动换行
- 池连接都已被使用并已达到最大池大小 是什么意思啊
- 为什么 visual studio 2010 web 程序都有一个我的ASP.NET 应用程序?如何去掉?
- 未处理 MyCement.Database.AdoNet.AdoException
- 是不是教程有错?
- 这是什么语法错误?
- asp.net 中RadioButtonList控件问题,如何判断是哪条记录的?
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
呵呵,关键点在这第一句。
if (!IsPostBack)
{
ReportViewer1.ServerReport.ReportServerCredentials = new MyReportServerCredentials();
}
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();
}