|
|
|
|
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
|
|
|
|
/* |
|
|
|
|
* Copyright 2002-2015 the original author or authors. |
|
|
|
|
* Copyright 2002-2018 the original author or authors. |
|
|
|
|
* |
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
|
@ -41,13 +41,14 @@ import net.sf.jasperreports.engine.export.JRPdfExporter;
@@ -41,13 +41,14 @@ import net.sf.jasperreports.engine.export.JRPdfExporter;
|
|
|
|
|
import net.sf.jasperreports.engine.export.JRPdfExporterParameter; |
|
|
|
|
import net.sf.jasperreports.engine.export.JRXlsExporterParameter; |
|
|
|
|
import net.sf.jasperreports.engine.util.JRLoader; |
|
|
|
|
|
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFCell; |
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFRow; |
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFSheet; |
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
|
|
|
|
import org.junit.BeforeClass; |
|
|
|
|
import org.junit.Ignore; |
|
|
|
|
import org.junit.Test; |
|
|
|
|
|
|
|
|
|
import org.springframework.core.io.ClassPathResource; |
|
|
|
|
import org.springframework.tests.Assume; |
|
|
|
|
|
|
|
|
|
@ -149,6 +150,7 @@ public class JasperReportsUtilsTests {
@@ -149,6 +150,7 @@ public class JasperReportsUtilsTests {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
@Ignore("JasperReports 6.2.1 is incompatible with POI 3.17") |
|
|
|
|
public void renderAsXlsWithDataSource() throws Exception { |
|
|
|
|
ByteArrayOutputStream os = new ByteArrayOutputStream(); |
|
|
|
|
JasperReportsUtils.renderAsXls(getReport(), getParameters(), getDataSource(), os); |
|
|
|
|
@ -157,6 +159,7 @@ public class JasperReportsUtilsTests {
@@ -157,6 +159,7 @@ public class JasperReportsUtilsTests {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
@Ignore("JasperReports 6.2.1 is incompatible with POI 3.17") |
|
|
|
|
public void renderAsXlsWithCollection() throws Exception { |
|
|
|
|
ByteArrayOutputStream os = new ByteArrayOutputStream(); |
|
|
|
|
JasperReportsUtils.renderAsXls(getReport(), getParameters(), getData(), os); |
|
|
|
|
@ -165,6 +168,7 @@ public class JasperReportsUtilsTests {
@@ -165,6 +168,7 @@ public class JasperReportsUtilsTests {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
@Ignore("JasperReports 6.2.1 is incompatible with POI 3.17") |
|
|
|
|
public void renderAsXlsWithExporterParameters() throws Exception { |
|
|
|
|
ByteArrayOutputStream os = new ByteArrayOutputStream(); |
|
|
|
|
Map<JRExporterParameter, Object> exporterParameters = new HashMap<JRExporterParameter, Object>(); |
|
|
|
|
|