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
This commit is contained in:
Carlos Ruiz 2012-02-05 13:04:12 -05:00
parent 92eb073741
commit 6fd09ca3ea
3 changed files with 19 additions and 1 deletions

View File

@ -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')
;

View File

@ -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')
;

View File

@ -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);