C# Microsoft.Reporting.Winforms RDLC - 如何在正文中添加详细信息部分? [英] C# Microsoft.Reporting.Winforms RDLC - how to add detail sections in body?

查看:30
本文介绍了C# Microsoft.Reporting.Winforms RDLC - 如何在正文中添加详细信息部分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在渲染一个 Winforms.LocalReport,想知道它是否可行,以及如何像在 MS Access Report 和 Crystal Reports 中那样将详细信息/部分添加到报告正文中.

I am rendering a Winforms.LocalReport and would like to know if it is possible, and how to add Detail/Sections to the body of the report like in MS Access Report and Crystal Reports.

组织细节将有助于管理分页符,并且在添加新/删除现有字段时也可以更轻松地进行总体设计.我有 300 多个字段,不包括子报表.

Organising into details will help manage page breaks and also general designing easier when adding new / removing existing fields. I have 300 over fields not including subreports.

或者,此功能是否已被其他更好的功能取代?感谢任何建议谢谢!

OR, has this feature been superceded by some other better feature? Appreciate any advice thanks!

推荐答案

在访问报表和水晶报表等工具中,我们使用带区(例如详细信息带区、组标题带区等).但是,在 RDL 中,报告的基础是使用 List ReportItem、Table ReportItem、Chart ReportItem 和 Matrix ReportItem 等 ReportItem.

In tools like access reports and crystal reports, we use bands (e.g. detail band, group header band, etc.). However, in RDL the basis of reporting by using ReportItems like the List ReportItem, the Table ReportItem, Chart ReportItem, and Matrix ReportItem.

当您尝试重新创建大多数典型的带状报告时,您可能会发现 List ReportItems 最有用.Table ReportItem 有一个详细信息行",您可以添加组,其中每个组都有一组标题行和页脚行.表格行不允许像乐队那样自由形式的布局,但通常我们无论如何都会跨乐队对齐东西,所以这通常不是问题.

As you try to recreate most of your typical banded reports, you will probably find the List ReportItems most useful. The Table ReportItem has a "detail row" and you can add groups where each group has a set of header rows and footer rows. A table row does not allow free-form layout like a band, but usually we're aligning things across bands anyway, so this generally isn't a problem.

List ReportItem 有点像详细信息部分,可能正是您要查找的内容.您将列表绑定到您的数据,它将为您的数据的每一行重复列表的内容(您放置在列表中的文本框、图像等).如果需要,您可以嵌套列表以获得类似的结果,以便在带状报表编写器中对页眉/页脚部分进行分组.

The List ReportItem is kind of like a Detail Section and is probably what you're looking for. You bind the List to your data and it will repeat the content of the list (the textboxes, images, etc that you place in the list) for each row of your data. If you want you can nest lists to get similar results to group header/footer sections in a banded report writer.

每个报表项(表格、图表等)类似于在传统的带状报表编写器中使用子报表,但它们更易于使用并且通常更高效(内存更少,运行速度更快).ReportItems 允许您在单个报告中轻松使用来自多个数据源的数据.

Each ReportItem (table, chart, etc.) is similar to using a SubReport in traditional banded report writers, but they're easier to work with and are generally more efficient (less memory, run faster). ReportItems allow you to easily use data from multiple data sources in a single report.

有关详细信息,请参阅 RDL 规范.

For more information see the first question in the "Question & Answers" section of the RDL Specification.

这篇关于C# Microsoft.Reporting.Winforms RDLC - 如何在正文中添加详细信息部分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆