From 92eb073741e70d413fa0c1308db52d8052d347ef Mon Sep 17 00:00:00 2001 From: Dirk Niemeyer Date: Sun, 5 Feb 2012 12:52:42 -0500 Subject: [PATCH] IDEMPIERE-133 use most specific version of MSysConfig.getValue to get setting for current client and org or system setting if exists or default --- .../src/org/adempiere/webui/window/ZkReportViewer.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java index 467a2cfe25..2e8e3c0953 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java @@ -200,8 +200,9 @@ public class ZkReportViewer extends Window implements EventListener, ITabOnClose //set default type String type = m_reportEngine.getPrintFormat().isForm() - ? MSysConfig.getValue("ZK_REPORT_FORM_OUTPUT_TYPE") - : MSysConfig.getValue("ZK_REPORT_TABLE_OUTPUT_TYPE"); + // a42niem - provide explicit default and check on client/org specifics + ? MSysConfig.getValue("ZK_REPORT_FORM_OUTPUT_TYPE","PDF",Env.getAD_Client_ID(m_ctx),Env.getAD_Org_ID(m_ctx)) + : MSysConfig.getValue("ZK_REPORT_TABLE_OUTPUT_TYPE","HTML",Env.getAD_Client_ID(m_ctx),Env.getAD_Org_ID(m_ctx)); if ("PDF".equals(type)) previewType.setSelectedIndex(0); @@ -210,7 +211,8 @@ public class ZkReportViewer extends Window implements EventListener, ITabOnClose else if ("XLS".equals(type)) previewType.setSelectedIndex(2); else - previewType.setSelectedIndex(0); //fallback to PDF + // XXX - provide hint if unexpected value + previewType.setSelectedIndex(0); //fall back to PDF labelDrill.setValue(Msg.getMsg(Env.getCtx(), "Drill") + ": ");