- fixed a potential NPE in ReportEngine
- change the single ZK_REPORT_DEFAULT_OUTPUT_TYPE to ZK_REPORT_TABLE_OUTPUT_TYPE and ZK_REPORT_FORM_OUTPUT_TYPE. This changes allow administrator to set different default output type for form and table report. The default remain as PDF if the configuration parameter is not set.
This commit is contained in:
Heng Sin Low 2009-07-28 04:44:53 +00:00
parent f03cafdac1
commit 81257ae42c
2 changed files with 4 additions and 2 deletions

View File

@ -291,7 +291,7 @@ public class ReportEngine implements PrintServiceAttributeListener
*/
public Properties getCtx()
{
return m_layout.getCtx();
return getLayout().getCtx();
} // getCtx
/**

View File

@ -188,7 +188,9 @@ public class ZkReportViewer extends Window implements EventListener {
toolBar.appendChild(new Separator("vertical"));
//set default type
String type = MSysConfig.getValue("ZK_REPORT_DEFAULT_OUTPUT_TYPE");
String type = m_reportEngine.getPrintFormat().isForm()
? MSysConfig.getValue("ZK_REPORT_FORM_OUTPUT_TYPE")
: MSysConfig.getValue("ZK_REPORT_TABLE_OUTPUT_TYPE");
if ("PDF".equals(type))
previewType.setSelectedIndex(0);
else if ("HTML".equals(type))