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

WilliamGui WilliamGui 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

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页不行? 为什么?

...全文

相关推荐

评论 2
收藏 已收藏
分享
返回顶部
WilliamGui
C# 111,129 成员 642,538 内容