Grape City Active Reports 11,导出为ex​​cel重复行

时间:2017-05-19 17:56:00

标签: excel activereports

我们有一个报告,当我们将它导出到excel时会复制几行。当我逐步执行detail_format方法时,只有1条记录用于重复的行。此外,当我导出到PDF格式时,它工作正常。对于重复行,有一列显示下一行的数据。所以,我扩大了该列,现在它导出OK。这对于当前数据来说很好,但是,如果有更宽的数据,它会再次执行。文本框中的相关属性为:

CanGrow = True; 
CanShrink = False; 
MultiLine = True; 
WrapMode = WrapMode.WordWrap;

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:2)

导出到Excel时,可以将TextBox的WrapMode设置为None。这不会为具有大数据的列创建另一行。

SectionReport1 rpt = new SectionReport1();
(rpt.Sections["detail"].Controls["textBox3"] as GrapeCity.ActiveReports.SectionReportModel.TextBox).WrapMode = GrapeCity.ActiveReports.Document.Section.WrapMode.NoWrap;
rpt.Run();

XlsExport excelExport = new XlsExport();
excelExport.Export(rpt.Document, "../../SectionReport.xls");