From 6fd09ca3eae21fce7e4d44b298920f52cc011cec Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sun, 5 Feb 2012 13:04:12 -0500 Subject: [PATCH] IDEMPIERE-133 Make Zk report type configurable per client and org http://jira.idempiere.com/browse/IDEMPIERE-133 Default to PDF for backward compatibility - added the sysconfig records --- migration/360lts-release/oracle/814_IDEMPIERE-133.sql | 9 +++++++++ .../360lts-release/postgresql/814_IDEMPIERE-133.sql | 9 +++++++++ .../src/org/adempiere/webui/window/ZkReportViewer.java | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 migration/360lts-release/oracle/814_IDEMPIERE-133.sql create mode 100644 migration/360lts-release/postgresql/814_IDEMPIERE-133.sql diff --git a/migration/360lts-release/oracle/814_IDEMPIERE-133.sql b/migration/360lts-release/oracle/814_IDEMPIERE-133.sql new file mode 100644 index 0000000000..e692f2ce09 --- /dev/null +++ b/migration/360lts-release/oracle/814_IDEMPIERE-133.sql @@ -0,0 +1,9 @@ +-- Feb 5, 2012 12:56:29 PM COT +-- IDEMPIERE-133 Make Zk report type configurable per client and org +INSERT INTO AD_SysConfig (AD_SysConfig_ID,EntityType,ConfigurationLevel,Name,Value,Description,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive) VALUES (200002,'D','O','ZK_REPORT_FORM_OUTPUT_TYPE','PDF','Type of output in zkwebui for reports of type form, possible values are PDF, HTML, XLS',0,0,TO_DATE('2012-02-05 12:56:28','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-02-05 12:56:28','YYYY-MM-DD HH24:MI:SS'),0,0,'Y') +; + +-- Feb 5, 2012 12:56:54 PM COT +INSERT INTO AD_SysConfig (AD_SysConfig_ID,EntityType,ConfigurationLevel,Name,Value,Description,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive) VALUES (200003,'D','O','ZK_REPORT_TABLE_OUTPUT_TYPE','PDF','Type of output in zkwebui for reports of type table, possible values are PDF, HTML, XLS',0,0,TO_DATE('2012-02-05 12:56:54','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-02-05 12:56:54','YYYY-MM-DD HH24:MI:SS'),0,0,'Y') +; + diff --git a/migration/360lts-release/postgresql/814_IDEMPIERE-133.sql b/migration/360lts-release/postgresql/814_IDEMPIERE-133.sql new file mode 100644 index 0000000000..445b82777d --- /dev/null +++ b/migration/360lts-release/postgresql/814_IDEMPIERE-133.sql @@ -0,0 +1,9 @@ +-- Feb 5, 2012 12:56:29 PM COT +-- IDEMPIERE-133 Make Zk report type configurable per client and org +INSERT INTO AD_SysConfig (AD_SysConfig_ID,EntityType,ConfigurationLevel,Name,Value,Description,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive) VALUES (200002,'D','O','ZK_REPORT_FORM_OUTPUT_TYPE','PDF','Type of output in zkwebui for reports of type form, possible values are PDF, HTML, XLS',0,0,TO_TIMESTAMP('2012-02-05 12:56:28','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-02-05 12:56:28','YYYY-MM-DD HH24:MI:SS'),0,0,'Y') +; + +-- Feb 5, 2012 12:56:54 PM COT +INSERT INTO AD_SysConfig (AD_SysConfig_ID,EntityType,ConfigurationLevel,Name,Value,Description,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive) VALUES (200003,'D','O','ZK_REPORT_TABLE_OUTPUT_TYPE','PDF','Type of output in zkwebui for reports of type table, possible values are PDF, HTML, XLS',0,0,TO_TIMESTAMP('2012-02-05 12:56:54','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-02-05 12:56:54','YYYY-MM-DD HH24:MI:SS'),0,0,'Y') +; + 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 2e8e3c0953..8a49662237 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 @@ -202,7 +202,7 @@ public class ZkReportViewer extends Window implements EventListener, ITabOnClose String type = m_reportEngine.getPrintFormat().isForm() // 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)); + : MSysConfig.getValue("ZK_REPORT_TABLE_OUTPUT_TYPE","PDF",Env.getAD_Client_ID(m_ctx),Env.getAD_Org_ID(m_ctx)); if ("PDF".equals(type)) previewType.setSelectedIndex(0);