我的水晶报表中有多个页面,但它显示1,2 and 258
页面正常但第 3 页到第 257 页页面未显示在我的报表页面上
我这样编码
private void Page_Init(object sender, EventArgs e)
{
if (Session["reportDocument"] != null)
{
reportDocument = (ReportDocument)Session["reportDocument"];
Session["reportDocument"] = null;
rptClients.ReportSource = reportDocument;
Session["reportDocument"] = reportDocument;
}
}
我用打击代码填充会话值
protected void FillClientsReport()
{
int _group = Convert.ToInt32(rbtnlClients.SelectedValue);
int CompanyId = int.Parse(ddlCompany.SelectedValue);
rptClients.ReportSource = null;
reportDocument.Load(Server.MapPath("~/Report/ClientList.rpt"));
DataSet ds = _clientService.GetClientsReport(_group, CompanyId);
reportDocument.SetDatabaseLogon
(myLogOnInfo.ConnectionInfo.UserID, myLogOnInfo.ConnectionInfo.Password, myLogOnInfo.ConnectionInfo.ServerName, myLogOnInfo.ConnectionInfo.DatabaseName);
reportDocument.SetParameterValue("@GroupBy", _group);
reportDocument.SetParameterValue("@CompanyID", CompanyId);
reportDocument.SetDataSource(ds.Tables[0]);
rptClients.Visible = true;
//ViewState["reportDocument"] = reportDocument;
Session["reportDocument"] = reportDocument;
rptClients.ReportSource = reportDocument;
rptClients.DataBind();
rptClients.RefreshReport();
}