From d6e96b3f059e7595635f10134b7f876c7cf6e6be Mon Sep 17 00:00:00 2001 From: hieplq Date: Wed, 7 Jan 2015 23:00:51 +0700 Subject: [PATCH] IDEMPIERE-1689:When use Jaspersoft for print document. Extend of file name is incorect with type --- .../WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 11bfd89bf2..c4eeafe702 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 @@ -244,7 +244,7 @@ public class ZkJRViewer extends Window implements EventListener, ITabOnCl if ( "PDF".equals( reportType ) ) { attachment = getPDF(); - media = new AMedia(m_title, "pdf", "application/pdf", attachment, true); + media = new AMedia(m_title + ".pdf", "pdf", "application/pdf", attachment, true); } else if ("HTML".equals(reportType)) { String path = System.getProperty("java.io.tmpdir"); @@ -281,7 +281,7 @@ public class ZkJRViewer extends Window implements EventListener, ITabOnCl exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, fos); exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); exporterXLS.exportReport(); - media = new AMedia(m_title, "xls", "application/vnd.ms-excel", file, true); + media = new AMedia(m_title + ".xls", "xls", "application/vnd.ms-excel", file, true); }else if ("CSV".equals(reportType)) { String path = System.getProperty("java.io.tmpdir"); @@ -297,7 +297,7 @@ public class ZkJRViewer extends Window implements EventListener, ITabOnCl exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, fos); exporter.exportReport(); - media = new AMedia(m_title, "csv", "application/csv", file, true); + media = new AMedia(m_title + ".csv", "csv", "application/csv", file, true); }else if ("SSV".equals(reportType)) { String path = System.getProperty("java.io.tmpdir");