|
|
@@ -124,6 +124,13 @@ public class PrintServiceImpl implements PrintService {
|
|
|
JasperReport jasperReport = JasperCompileManager.compileReport(inputStream);
|
|
|
jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, connection);
|
|
|
inputStream.close();
|
|
|
+ } else if ((exportType == ExportType.XLS || exportType == ExportType.XLSX) &&
|
|
|
+ ignorepage(reportName, connection, dataSource.getDbType())) {
|
|
|
+ JasperDesign jasperDesign = JRXmlLoader.load(jrxmlFilePath);
|
|
|
+ //移除分页之间的间隔
|
|
|
+ jasperDesign.setIgnorePagination(true);
|
|
|
+ JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
|
|
|
+ jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, connection);
|
|
|
} else {
|
|
|
jasperPrint = JasperFillManager.fillReport(jasperFilePath, parameters, connection);
|
|
|
}
|
|
|
@@ -811,4 +818,19 @@ public class PrintServiceImpl implements PrintService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private boolean ignorepage(String reportName, Connection connection, String dbtype) {
|
|
|
+ String sql = "select * from sysprintset where REPORTNAME='" + reportName + "' and nvl(IgnorePage,0)= -1";
|
|
|
+ int count = 0;
|
|
|
+ try {
|
|
|
+ count = getCount(connection, sql, dbtype);
|
|
|
+ if (count > 0) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ } catch (SQLException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
}
|