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

查看:24
本文介绍了水晶报表导出到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.将创建 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");

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 标记为Can Grow"的字段将与它们下方的空白行合并.

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.

这篇关于水晶报表导出到excel单元格合并问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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