如何在 VS Report Viewer 2008 中显示数据源内的子列表?
我创建了一个静态通用列表(列表)并将其绑定到报表查看器的数据源。在报表查看器设计器中,我能够找到正确的数据源(列表),还能够将 ProductName、ProductNo 等属性从单个 Product 对象拖放到报表上。
然而,这个Product对象本身又包含另一个List(列表)。我的问题是如何从这个内部列表中获取对象并将它们显示到报告上?
任何帮助将不胜感激!
I have created a static Generic List (List) and bind it to a Report Viewer's data source. In the Report Viewer designer, I am able to find the correct data source which is List and also able to drag and drop properties like ProductName, ProductNo from a single Product object onto the report.
However, this Product object itself contains another List (List). My question is how I can get the objects from this inner List and display them onto the report?
Any help would be much appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
两种方法:
两个。另一种方法是您可以拥有第二个数据源并将另一个表/列表对象拖放到报表上。您可以告诉该对象采用第二个数据源 dsSecond。然后,您可以将第二个数据集中的字段拖放到报告的此表/列表中。
很简单!
2 ways:
TWO. The other way to do it is you could have a second data source and drag and drop another table / list object onto the report. You would tell this object to take on the second datasource dsSecond. Then you can drag and drop your fields from this second dataset into this table / list of the report.
Very simple!