水晶报表不连数据库如何分页

zhangxh20 2008-10-31 04:14:32
现在没有连接数据库,在后台直接绑定
ReportDocument rd = new ReportDocument();
rd.Load(Server.MapPath("CrystalReport1.rpt"));
this.CrystalReportViewer1.ReportSource = rd;
假设现在有一个string数组
如何让这个数组里的元素,分页显示在报表上呢?
就是每一页显示数组的一条记录,数组有10个元素,就分10页显示
...全文
72 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
阿泰 2008-11-03
  • 打赏
  • 举报
回复
通过参数传递进去实现不了分页效果
需先将string解析成一个dataset,10条记录
可参考
http://www.cnblogs.com/babyt/archive/2008/08/21/1273363.html

然后在报表模板上设置每页只显示1条记录即可。
可参考
http://babyt.cnblogs.com/archive/2005/03/11/116907.aspx#406938
看到第4个图的位置即可
公式更改为recordnumber mod 1=0


zhangxh20 2008-10-31
  • 打赏
  • 举报
回复
ParameterFields paramFields = crystalReportViewer.ParameterFieldInfo;
ParameterField recordCountField = paramFields[fieldName];
ParameterValues recordCountValues = recordCountField.CurrentValues;
recordCountValues.AddValue(fieldValue);
通过这个方法来添加的

4,818

社区成员

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

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