Jasper reports Jasper Soft Excel列问题

Jasper reports Jasper Soft Excel列问题,jasper-reports,Jasper Reports,我有8个子报告放在主报告上 已启用“打印一页每页”。 和启用每个子报表后net.sf.jasperreports.export.xls.break.after.row属性(用于在新工作表中打印每个子报表) 将每个报表单独导出到excel时,excel工作表中的每一列都与报表的列相匹配。 但将其放置在主报表中后,excel列与报表列重叠。 如何解决这个问题?excel将各个子报表放在不同的表单中的一个解决方案是不使用主报表,而是将不同子报表的JasperPrint作为不同的表单传递 示例 List

我有8个子报告放在主报告上 已启用“打印一页每页”。 和启用每个子报表后net.sf.jasperreports.export.xls.break.after.row属性(用于在新工作表中打印每个子报表) 将每个报表单独导出到excel时,excel工作表中的每一列都与报表的列相匹配。 但将其放置在主报表中后,excel列与报表列重叠。
如何解决这个问题?

excel将各个子报表放在不同的表单中的一个解决方案是不使用主报表,而是将不同子报表的JasperPrint作为不同的表单传递

示例

List<JasperPrint> sheets = new ArrayList<JasperPrint>();
for (int i=1;i<=8;i++){
   JasperPrint print = JasperFillManager.fillReport("subReport_" + i + ".jasper", paramMap, connection);
   sheets.add(print); 
}

JRXlsxExporter exporter = new JRXlsxExporter();
exporter.setExporterInput(SimpleExporterInput.getInstance(sheets));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(new File("text.xlxs"));
SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
configuration.setSheetNames(sheetNames): //sheets names is an array of the different names.
configuration.setDetectCellType(true);
configuration.setWhitePageBackground(false);
configuration.setRemoveEmptySpaceBetweenColumns(true);
configuration.setRemoveEmptySpaceBetweenRows(true);
exporter.setConfiguration(configuration);
exporter.exportReport();
List sheets=new ArrayList();
对于(int i=1;i