[求教]水晶报表每页显示指定行数

雷肿么了 2010-09-13 11:35:31
我让水晶报表每页显示5条数据,

在详细资料节处,设置了 在后面页新建页,
代码:
if recordnumber mod 5=0 then
true
else
false

最后显示出来是按每页5条来分页的,但有一问题
就是水晶报表的下一页点击没反应了.
比如有10页,每页5条, 运行出来的时候点击下一页可以跳转到第二页, 但继续点击下一页就没有反应了.

求指点..
...全文
257 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
阿泰 2010-09-14
  • 打赏
  • 举报
回复
先写在按钮事件,然后用Session之类的保持~~

参考
【水晶报表内功心法】--第一阶段小结 [推荐]

第2小节
雷肿么了 2010-09-14
  • 打赏
  • 举报
回复
问题还没有解决了.
代码放在Page_Init 里 输入的查询条件根本取不到. 在这个事件里取到的都是空值..
雷肿么了 2010-09-14
  • 打赏
  • 举报
回复
OK 了.. 之前 页面还加了这段代码

//protected void Page_UnLoad(object sender, EventArgs e)
//{
// myRpt.Dispose();
//}

我说怎么会报错类.
阿双2009 2010-09-13
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 z307755214 的回复:]
3Q,
阿泰, 这么快就回来了..?
[/Quote]
上周五回来的
雷肿么了 2010-09-13
  • 打赏
  • 举报
回复
3Q,
阿泰, 这么快就回来了..?

阿泰 2010-09-13
  • 打赏
  • 举报
回复
代码段放到Page_Init,VS2008里的水晶报表的BUG
雷肿么了 2010-09-13
  • 打赏
  • 举报
回复
我把代码放在Page_Init 里输入查询条件没有效了.

private void Page_Init(object sender, EventArgs e)
{
if (IsPostBack)
bind();
}

protected void bind()
{
int year = int.Parse(ddl_year.SelectedValue.ToString());
string cust_code = txt_cust_code.Text.Trim();
string cust_name = txt_cust_name.Text.Trim();
int type = rbt_amount.Checked ? 0 : 1; ;


string path = Server.MapPath("./Customer_monthly_analysis01.rpt");

myRpt.Load(path);
myRpt.SetDataSource(Get_Customer_Monthly_Analysis(year, cust_code, cust_name, type));
CrystalReportViewer1.ReportSource = myRpt;
SetRptDiscreteVale(CrystalReportViewer1, "yreaParam", ddl_year.SelectedValue.ToString());
if (type == 0)
{
SetRptDiscreteVale(CrystalReportViewer1, "typeParam", "0");
}
else
{
SetRptDiscreteVale(CrystalReportViewer1, "typeParam", "1");
}
}

4,816

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧