Crystal报表导出到excel单元格合并问题 [英] Crystal reports export to excel cell merge issue

查看:254
本文介绍了Crystal报表导出到excel单元格合并问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从Crystal Reports导出时,标记为 Can Grow 的任何字段将与其下方的空白行合并。

When I export from Crystal Reports, any fields that are marked as Can Grow are merged with an otherwise blank row below them.

这完全搞砸了我的排序。我如何解决这个问题?

This completely messes up my sorting. How can I resolve this?

推荐答案

我建议另一种方法:选择 ExportFormatType.ExcelRecord而不是ExportFormatType.Excel < STRONG>。 xls文件将被创建而不进行格式化。

I suggest another way: choose 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:


  • 将CrystalReportViewer控件替换为 ReportExporter 控制。它将以您选择的格式导出报告。

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

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/en-us/library/ms225954%28v=vs.90%29.aspx =nofollow noreferrer> ExportToDisk 方法

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

  • Export dataset to excel (Look at Ahmed answer)

您可以选择最适合您需求的方式,但您必须尝试,如果它适用于在开发或发行服务器中使用的运行时, strong>。

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报表导出到excel单元格合并问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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