diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java index 92d6fcfe36..7549be3cd7 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java @@ -93,8 +93,6 @@ public class WReportCustomization implements IFormController,EventListener, ITab int AD_PrintFormat_ID = m_reportEngine.getPrintFormat().get_ID(); Env.setContext(m_ctx, "AD_PrintFormat_ID", AD_PrintFormat_ID); - - ADForm form = ADForm.openForm(SystemIDs.FORM_REPORT_WIZARD); + ADForm form = ADForm.openForm(SystemIDs.FORM_REPORT_WIZARD); WReportCustomization av = (WReportCustomization) form.getICustomForm(); av.setReportEngine(m_reportEngine); - - form.setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED); + form.setClosable(true); + form.setWidth("70%"); + form.setHeight("85%"); + form.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener() { + @Override + public void onEvent(Event event) throws Exception { + if (DialogEvents.ON_WINDOW_CLOSE.equals(event.getName())) { + if(m_reportEngine.getPrintFormat().get_ID()!=Env.getContextAsInt(m_ctx, "AD_PrintFormat_ID")){ + fillComboReport (m_reportEngine.getPrintFormat().get_ID()); + } + cmd_report(); + } + } + }); + form.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED); SessionManager.getAppDesktop().showWindow(form); } // cmd_Wizard