错误日志:
页面数据正在加载,但是分页不起作用。 还添加了web.config更改。
aspx代码
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0
,Culture=neutral, PublicKeyToken=89845dcd8080cc91"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<rsweb:reportviewer id="ReportViewer2" asyncrendering="false"
width="100%" sizetoreportcontent="True"
processingmode="Remote"
enableviewstate="True"
enablepartialrendering="false" pagecountmode="Actual"
runat="server">
</rsweb:reportviewer>
aspx.cs代码
if (!this.IsPostBack)
{
ReportViewer2.ProcessingMode = ProcessingMode.Local;
ReportViewer2.LocalReport.ReportPath = Server.MapPath("Report.rdlc");
PrintCheck dsChequeInfo = GetData(string.Format("select * from vw_ChequeDetails with(nolock) where PayRefNo in ({0}) order by Convert(numeric, PayRefNo),Invoice_No,DC desc", PayRefNos));
Response.Write("dsChequeInfo" + dsChequeInfo.Tables[0].Rows.Count);
dsChequeInfo.EnforceConstraints = false;
ReportDataSource datasource = new ReportDataSource("PrintCheck", dsChequeInfo.Tables[0]);
ReportViewer2.LocalReport.DataSources.Clear();
ReportViewer2.LocalReport.DataSources.Add(datasource);
}