VS2008 用Crystal Report做报表不能翻第3页

WilliamGui 2011-06-04 02:44:23

VS2008 用Crystal Report做报表不能翻第3页,只能直接输入页码再点"转到",Why?

我的步骤:

1. 做一个新Crystal Report报表,在报表设计里直接连接数据库并写SQL完成报表。
2. 做一个Web页面,有个查询条件,添加CrystalReportViewer1, 写了个方法如下:
private bool MyRptDataBind()
{
string vSql;
vSql = "select * from table where .... "+页面上的条件
DataTable dt = da.GetDataTable(vSql);
if (dt != null)
{
ReportDocument rd = new ReportDocument();
string s = BR.GetReportsPath() + "SaleRptWeeklyStat.rpt";
rd.Load(s);
rd.SetDataSource(dt);
CrystalReportViewer1.ReportSource = rd;
CrystalReportViewer1.DataBind();
}
return truel;
}
3. 在CrystalReportViewer1的Load事件中调用,如下:
protected void CrystalReportViewer1_Load(object sender, EventArgs e)
{
if (!MyRptDataBind())
{
}
}

不能为什么,能正常显示报表,选择条件也正常,就是翻到第3页不行? 为什么?

...全文
53 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
kid_wang 2011-06-04
  • 打赏
  • 举报
回复
现在SQL里看看,第三页行不行。
WilliamGui 2011-06-04
  • 打赏
  • 举报
回复
顶一下

110,567

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

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