fhf_admin152 发表于 2019-3-27 10:40:45

   
以上已根据之前的模板做过修改,但数据中依然存在空行,图片为例,请帮忙看下模板是否还是哪儿不对

KearneyKang 发表于 2019-3-27 11:26:30

我看了,报表设计上没什么问题。

fhf_admin152 发表于 2019-3-27 13:50:43

那这个会不会是后台导出代码问题,因为涉及到客户体验,望能尽快协助解决下

KearneyKang 发表于 2019-3-27 16:52:17

您好,我试了。目前导出的样子是这样。这是一个正常的样式

fhf_admin152 发表于 2019-3-27 17:13:16

会不会是客户数量导致的这种情况,或者是某一种特殊情况下导致的,之前是空行列,现在是空行列会折叠,看行数会隔行,比如121下一个就是123,中间就是空行列,顺便能把你们测试环境下的导出后台代码提供下,我对比下我们的代码

KearneyKang 发表于 2019-3-27 19:12:04

导出Excel的代码:
GrapeCity.ActiveReports.PageReport report = new GrapeCity.ActiveReports.PageReport();GrapeCity.ActiveReports.Document.PageDocument reportDocument = new GrapeCity.ActiveReports.Document.PageDocument(report);

// Create an output directory.
System.IO.DirectoryInfo outputDirectory = new System.IO.DirectoryInfo(@"C:\MyExcel");
outputDirectory.Create();

// Provide settings for your rendering output.
GrapeCity.ActiveReports.Export.Excel.Page.ExcelRenderingExtensionSettings excelSetting = new GrapeCity.ActiveReports.Export.Excel.Page.ExcelRenderingExtensionSettings();
excelSetting.FileFormat = GrapeCity.ActiveReports.Export.Excel.Page.FileFormat.Xls;
GrapeCity.ActiveReports.Extensibility.Rendering.ISettings setting = excelSetting;

// Set the rendering extension and render the report.
GrapeCity.ActiveReports.Export.Excel.Page.ExcelRenderingExtension excelRenderingExtension = new GrapeCity.ActiveReports.Export.Excel.Page.ExcelRenderingExtension();
GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider outputProvider = new GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider(outputDirectory, System.IO.Path.GetFileNameWithoutExtension(outputDirectory.Name));

// Overwrite output file if it already exists.
outputProvider.OverwriteOutputFile = true;

reportDocument.Render(excelRenderingExtension, outputProvider, excelSetting.GetSettings());


fhf_admin152 发表于 2019-7-11 15:15:10

导出的数据依然出现空行,是否数据量超过多少就会存在空行,或者某种情况下会存在空行,请协助解决下

KearneyKang 发表于 2019-7-12 09:16:46

您好,我这边根据你的报表进行测试没有出现你反馈的出现空行的问题。无法重现你的问题

葡萄城三幺三 发表于 2019-7-23 10:45:32

您好,看到您的问题已经得到解决了。
有个小窍门,您后面在求助中心发帖时可以直接发布悬赏帖(本质和普通帖是一样的):lol。

悬赏帖可以吸引其他用户帮您解决问题,可能会更快的获得答案,同时您可以设置解决的人为最佳答案,这样对于后面遇到同样问题的人可以更快寻找答案。

现在回答悬赏贴还有 悬赏达人活动,欢迎了解~


KearneyKang 发表于 2019-7-23 11:38:20

:)
页: 1 [2]
查看完整版本: 导出excel出现空行空列