Crystal Report:导出到excell会生成“分页符”,重新获得了列标题 [英] Crystal Report: export to excell generates "page break", column header is reapeated

查看:56
本文介绍了Crystal Report:导出到excell会生成“分页符”,重新获得了列标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



尝试将报表导出到excel,生成的文档具有分页符的功能。重复列标题。 分页符与生成PDF报告的位置相同。

导出到excel时如何删除此分页符?是否有一些页面大小定义?


Trying to export a report to excel, the generated document has kind of page break. The column header is repeated. The "page break" are in the same positition than if I generate a PDF report.
How can I remove this page break when exporting to excel? Is there some page size definition?

推荐答案

您是否尝试过 ExportFormatType.ExcelRecord而不是ExportFormatType.Excel ?将创建xls文件而无需格式化。

Have you tried ExportFormatType.ExcelRecord instead of ExportFormatType.Excel? The xls file will be created without formatting.

如果实际上用户是使用ReportViewer工具栏的导出按钮导出报表,则可以:

If actually the user is exporting report using ReportViewer Toolbar Export button you can:

或在工具栏中隐藏导出按钮,并放入以编程方式导出的页面按钮

Or hide Export button from toolbar and put in the page buttons that exports programmatically

CrystalReportSource1.ReportDocument.ExportToHttpResponse(ExportFormatType .ExcelRecord,this.Response,false, report.xls);


  • 致电 < a href = http://msdn.microsoft.com/zh-cn/library/ms225954%28v=vs.90%29.aspx rel = nofollow noreferrer> ExportToDisk 方法

reportDocument.ExportToDisk(ExportFormatType.ExcelRecord, report.xls);

  • Export dataset to excel (Look at Ahmed answer)

您可以选择最适合自己需求的方式,但是必须尝试将其与开发或发行服务器中使用的运行时一起使用

You can choose the way that best fits your needs, but you must try if it works with the runtime you use either in development or in release server.

ExportFormatType.ExcelRecord 表示生成的xls文件没有格式。如果设置了标记为可以增长的 ExportFormatType.Excel 字段,则将其下的空白行合并。

ExportFormatType.ExcelRecord means that is generated an xls file, without formatting. If you set ExportFormatType.Excel fields that are marked as "Can Grow" are merged with an otherwise blank row below them.

这篇关于Crystal Report:导出到excell会生成“分页符”,重新获得了列标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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