- 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:
parent
f03cafdac1
commit
81257ae42c
|
@ -291,7 +291,7 @@ public class ReportEngine implements PrintServiceAttributeListener
|
|||
*/
|
||||
public Properties getCtx()
|
||||
{
|
||||
return m_layout.getCtx();
|
||||
return getLayout().getCtx();
|
||||
} // getCtx
|
||||
|
||||
/**
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue