找回密码
 立即注册

QQ登录

只需一步,快速开始

gw0506

超级版主

177

主题

4208

帖子

9025

积分

超级版主

Rank: 8Rank: 8

积分
9025

活字格认证

gw0506
超级版主   /  发表于:2015-3-13 17:40  /   查看:4226  /  回复:1
The current release of ComponentOne Reports for WinForms includes a new component, C1.C1Report.C1Report. This component provides a complete compatible replacement for C1.Win.C1Report.C1Report found in previous releases. The only difference, from the user code point of view, is the namespace change (C1.C1Report instead of C1.Win.C1Report). The C1.C1Report namespace also provides all other familiar public C1Report classes such as Field, Section, and so on. Again, the only expected difference affecting the user is the namespace change.

Internally, the new C1Report works differently from the old version. Whereas the old C1Report engine in the usual (preview/print) scenario generated metafile page images, the new C1Report builds a C1PrintDocument representing the report. That document is accessible via the new public read-only property on C1Report:
  1. C1PrintDocument C1Report.C1Document {get;}.
复制代码


The document can then be used in any of the usual ways; for example, it can be exported to one of the formats supported by C1PrintDocument.

Export filters:
Along with other public members exposed by the old version, the new C1Report provides the familiar WinForms C1Report’s export filters, so the following code is still completely valid:
  1. report.Load(...);
  2. report.RenderToFile("MyReport.rtf",C1.C1Report.FileFormatEnum.RTF);
复制代码

It is important to note that the file produced by the code above (in our example, an RTF file) will differ from the file produced by exporting the C1PrintDocument exposed by the report:
  1. report.Load(...);
  2. report.C1Document.Export("MyReport.rtf");
复制代码

Usually, the RenderToFile would yield better results, unless the target format is a fixed layout format (such as PDF), in which case the results should be identical.
Note also that the RenderToFile method does not support the new XPS format, the only way to generate an XPS file is to export the C1PrintDocument exposed by C1Report.

1 个回复

倒序浏览
gw0506
超级版主   /  发表于:2015-3-23 18:04:00
沙发
恭喜GCDN用户 薛堃 已经完成翻译,获得 3312 GCDN金币!

1. 开始使用Reports for WinForms.doc (26.5 KB, 下载次数: 269)
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部