excel - Crystal 报表导出到Excel单元格合并问题

标签 excel crystal-reports export

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

这完全打乱了我的排序。我该如何解决这个问题?

最佳答案

我建议另一种方法:选择ExportFormatType.ExcelRecord 而不是ExportFormatType.Excel。将创建不带格式的 xls 文件。

如果用户实际上正在使用 ReportViewer 工具栏导出按钮导出报表,您可以:

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

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

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

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

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

ExportFormatType.ExcelRecord表示生成一个xls文件,没有格式化。如果您设置 ExportFormatType.Excel 标记为“可以增长”的字段将与其下方的空白行合并。

关于excel - Crystal 报表导出到Excel单元格合并问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3153199/

相关文章:

crystal-reports - Crystal Reports - 如果页面有 0 条记录,则抑制页面标题

c# - 在与报表文件不同的数据库上运行时,Crystal Report 加载速度非常慢

excel - .Offset(1, 0).EntireRow.Delete 出错

excel - 在工作表退出时清除数据透视表上的过滤器的 VBA 代码

excel - 使用Excel查找列中重复项的数量

c++ - 导出模板功能

perl - 如何将包符号导出到 Perl 中的命名空间?

excel - : Copy Data from multiple sheets into a single sheet in VBA 疑难解答

c# - 使用 Crystal Reports 打印条形码

php - 从 Access 2007 导出 XML(base64 附件)