找回密码
 立即注册

QQ登录

只需一步,快速开始

阿日斯朗

中级会员

2

主题

12

帖子

598

积分

中级会员

积分
598

活字格认证

QQ
最新发帖
阿日斯朗
中级会员   /  发表于:2013-5-16 17:05  /   查看:10909  /  回复:12
ActiveReports7在ASP.NET页面中如何绑定List数据源?
示例中提供的都是C/S结构的代码,B/S中绑定数据源的例子很少。可不可以帮忙解决一下?
我不在公司,就在去公司的路上。我不在家,就在回家的路上。

12 个回复

倒序浏览
ZenosZeng讲师达人认证 悬赏达人认证
超级版主   /  发表于:2013-5-16 17:52:00
沙发
阿日斯朗 你好

请问你使用的是区域报表(SectionReport)还是页面报表(PageReport)呢。
回复 使用道具 举报
阿日斯朗
中级会员   /  发表于:2013-5-16 22:28:00
板凳
两种页面绑定方法有什么不同吗?我参考DEMO中的绑定方法,在WEB页面中绑定不了。
我不在公司,就在去公司的路上。我不在家,就在回家的路上。
回复 使用道具 举报
阿日斯朗
中级会员   /  发表于:2013-5-16 22:29:00
地板
回复 2楼dof的帖子

PAGE和Section绑定方法有什么不同吗?
我不在公司,就在去公司的路上。我不在家,就在回家的路上。
回复 使用道具 举报
ZenosZeng讲师达人认证 悬赏达人认证
超级版主   /  发表于:2013-5-17 09:50:00
5#
Page动态绑定主要是在 LocateDataSource 事件中设置数据源;Section是通过设置DataSource来实现的。
回复 使用道具 举报
阿日斯朗
中级会员   /  发表于:2013-5-17 10:09:00
6#
谢谢您,我再试一下,在WEBpage中支持LocateDataSource 事件吗?
我不在公司,就在去公司的路上。我不在家,就在回家的路上。
回复 使用道具 举报
阿日斯朗
中级会员   /  发表于:2013-5-17 16:56:00
7#
回复 5楼dof的帖子

在绑定数据的时候为什么有好多重复的数据?
我用的是 Section报表
我不在公司,就在去公司的路上。我不在家,就在回家的路上。
回复 使用道具 举报
ZenosZeng讲师达人认证 悬赏达人认证
超级版主   /  发表于:2013-5-17 18:18:00
8#
先查看你绑定数据源是否本身有重复数据,如不能解决问题,你可以将你代码发送给我调试。

另外,你的头像很帅,王者风范
回复 使用道具 举报
阿日斯朗
中级会员   /  发表于:2013-5-19 21:03:00
9#
回复 8楼dof的帖子
  1. PageReport report = new PageReport();
  2.             report.Load(new FileInfo(Server.MapPath(@"~/TestPageReport.rdlx")));
  3.             DataSource mydataSource = new DataSource();
  4.             mydataSource.Name = "MyDataSource";
  5.             mydataSource.ConnectionProperties.DataProvider = "Object";
  6.             mydataSource.ConnectionProperties.ConnectString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\MVC学习\MyReportsDemo\MyReportsDemo\Reels.mdb";
  7.             DataSet MydataSet = new DataSet();
  8.             MydataSet.Name = "MyDataSet";
  9.             Query query = new Query();
  10.             query.DataSourceName = "MyDataSource";
  11.             query.CommandType = QueryCommandType.Text;
  12.             query.CommandText = "select top 9 * from Employee";
  13.             MydataSet.Query = query;
  14.             Field _field = new Field("employeeID", "employeeID", null);
  15.             MydataSet.Fields.Add(_field);
  16.             _field = new Field("Salary", "Salary", null);
  17.             MydataSet.Fields.Add(_field);
  18.             _field = new Field("StartDate", "StartDate", null);
  19.             MydataSet.Fields.Add(_field);
  20.             _field = new Field("EndDate", "EndDate", null);
  21.             MydataSet.Fields.Add(_field);
  22.             _field = new Field("Interests", "Interests", null);
  23.             MydataSet.Fields.Add(_field);
  24.             report.Report.ReportParameters[0].DefaultValue.Values.Add("我的参数");
  25.             report.Report.ReportParameters[1].DefaultValue.Values.Add("测试参数");
  26.             report.Report.DataSources.Add(mydataSource);
  27.             report.Report.DataSets.Add(MydataSet);
  28.          
  29.             report.Run();
  30.             WebViewer.Report = report;
复制代码

我想写成LIST类型的数据,试了好多次都不成功。麻烦您帮我调试一下。
我不在公司,就在去公司的路上。我不在家,就在回家的路上。
回复 使用道具 举报
ZenosZeng讲师达人认证 悬赏达人认证
超级版主   /  发表于:2013-5-20 16:22:00
10#
阿日斯朗 你好

如果你要用 List 作为数据源,你可以查看这个例子:C:\Users\用户名\Documents\ComponentOne Samples\ActiveReports Developer 7\Section Reports\C#\Data\IListBinding
回复 使用道具 举报
12下一页
您需要登录后才可以回帖 登录 | 立即注册
返回顶部