From be0e5134f8a3b258693a94693ee0651a1e050df4 Mon Sep 17 00:00:00 2001 From: Juan David Arboleda Date: Wed, 28 Nov 2012 01:14:41 -0500 Subject: [PATCH] IDEMPIERE-379 Reporting wizard for end users --- .../webui/apps/form/WReportCustomization.java | 75 ++++++++----------- .../webui/window/ZkReportViewer.java | 20 ++++- 2 files changed, 46 insertions(+), 49 deletions(-) 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