java下一页按钮,Crystal Report Viewer下一页按钮在ASP.NET中不起作用

编程知识 行业动态 更新时间:2024-06-13 00:21:17

我正在使用VS 2012 Ultimate,SAP Crystal Reports 13_0_13(最新版本) .

问题是,当我单击Crystal Report查看器的“下一页”按钮时,它会继续加载并且永远不会结束 .

我使用以下代码 .

protected void btn_search_Click(object sender, EventArgs e)

{

Session["ReportDocument"] = null;

loadReport(param1,param2,param3,param4);

}

loadReport 功能:

private void loadReport(string Param1, string Param2, string Param3, string param4)

{

CrystalReportViewer1.Visible = true;

ReportDocument reportDocument = new ReportDocument();

string reportPath = Server.MapPath(@"~/VacantAndFilledReports/rpt_vacantposts_HR.rpt");

reportDocument.Load(reportPath);

reportDocument.SetDatabaseLogon(ID, pass, serverName, databaseName);

reportDocument.SetParameterValue("@Param1", Param1);

reportDocument.SetParameterValue("@Param2", Param2);

reportDocument.SetParameterValue("@Param3", Param3);

reportDocument.SetParameterValue("Param4", Param4);

CrystalReportViewer1.ReuseParameterValuesOnRefresh = true;

CrystalReportViewer1.AutoDataBind = true;

CrystalReportViewer1.Zoom(88);

CrystalReportViewer1.ReportSource = reportDocument;

Session["ReportDocument"] = reportDocument;

}

我还将代码放在 Page_Init 中:

protected void Page_Init(object sender, EventArgs e)

{

if (Session["ReportDocument"] != null)

{

ReportDocument doc = (ReportDocument)Session["ReportDocument"];

CrystalReportViewer1.ReportSource = doc;

}

}

我已经搜索了很多关于Page Next按钮,所有帖子都是关于把代码放在 Page_Init 里面,但是如上所述尝试不适合我 .

更多推荐

java下一页按钮,Crystal Report Viewer下一页按钮在ASP.NET中不起作用

本文发布于:2023-03-31 14:00:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/e5b1d3102e0a4907bde627561920dc21.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:下一页   按钮   中不   Crystal   java

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!