我有一个rdlc报告,它通过Datatable从数据库表加载数据,但问题是它只显示27条记录,而不是更多。甚至c#中的sql表和数据表也填充了数据,但没有在RDLC报告中填充。
我到处都使用相同的代码和相同的问题。
protected void Page_Load(object sender, EventArgs e)
{
//ASP.controls_resultlabel_ascx ResultLabel = new ASP.controls_resultlabel_ascx();
if (!IsPostBack)
{
Fill_AuditsReport();
}
}
public void Fill_AuditsReport()
{
ReportViewer1.AsyncRendering = false;
ReportViewer1.SizeToReportContent = true;
ReportViewer1.ZoomMode = ZoomMode.FullPage;
this.ReportViewer1.Reset();
DataTable dt = new DataTable();
Audits.ManageAudits MngAudits = new Audits.ManageAudits();
dt = MngAudits.SelectAuditsInfo();
ReportViewer1.ProcessingMode = ProcessingMode.Local;
ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/DataManagementReports/AuditsReport.rdlc");
ReportDataSource rpds = new ReportDataSource("DataSetAudits", dt);
ReportViewer1.LocalReport.DataSources.Clear();
ReportViewer1.LocalReport.DataSources.Add(rpds);
ReportViewer1.Visible = true;
}
甚至数据表在调试时也会填充完整数据。