diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java index 96416301fa..4f5fbc55b8 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java @@ -359,10 +359,9 @@ public class ZkJRViewer extends Window implements EventListener, ITabOnCl prefix = makePrefix(jasperPrintList.get(0).getName())+"_List"; else prefix = makePrefix(jasperPrint.getName()); - if (log.isLoggable(Level.FINE)) - { - log.log(Level.FINE, "Path="+path + " Prefix="+prefix); - } + if (prefix.length() < 3) + prefix += "_".repeat(3-prefix.length()); + if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "Path="+path + " Prefix="+prefix); File file = File.createTempFile(prefix, ".xls", new File(path)); FileOutputStream fos = new FileOutputStream(file); @@ -388,10 +387,9 @@ public class ZkJRViewer extends Window implements EventListener, ITabOnCl prefix = makePrefix(jasperPrintList.get(0).getName())+"_List"; else prefix = makePrefix(jasperPrint.getName()); - if (log.isLoggable(Level.FINE)) - { - log.log(Level.FINE, "Path="+path + " Prefix="+prefix); - } + if (prefix.length() < 3) + prefix += "_".repeat(3-prefix.length()); + if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "Path="+path + " Prefix="+prefix); File file = File.createTempFile(prefix, ".csv", new File(path)); FileOutputStream fos = new FileOutputStream(file); JRCsvExporter exporter= new JRCsvExporter(); @@ -412,10 +410,9 @@ public class ZkJRViewer extends Window implements EventListener, ITabOnCl prefix = makePrefix(jasperPrintList.get(0).getName())+"_List"; else prefix = makePrefix(jasperPrint.getName()); - if (log.isLoggable(Level.FINE)) - { - log.log(Level.FINE, "Path="+path + " Prefix="+prefix); - } + if (prefix.length() < 3) + prefix += "_".repeat(3-prefix.length()); + if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "Path="+path + " Prefix="+prefix); File file = File.createTempFile(prefix, ".ssv", new File(path)); FileOutputStream fos = new FileOutputStream(file); JRCsvExporter exporter= new JRCsvExporter();