fixes #32 Problem with advanced query on report viewer
http://hg.idempiere.com/idempiere/issue/32
This commit is contained in:
parent
2b11005fc8
commit
4b22df1f7d
|
@ -668,10 +668,10 @@ public final class MLookup extends Lookup implements Serializable
|
|||
{
|
||||
log.fine(m_info.KeyColumn + ": Loader NOT Validated: " + m_info.ValidationCode);
|
||||
// Bug 1843862 - Lookups not working on Report Viewer window
|
||||
// globalqss - when called from Viewer window ignore error about unparsabe context variables
|
||||
// globalqss - when called from Viewer window ignore error about not parseable context variables
|
||||
// there is no context in report viewer windows
|
||||
//TODO: need different approach that is not client dependent
|
||||
if (Ini.isClient() == false /*|| !Env.getWindow(m_info.WindowNo).getClass().getName().equals("org.compiere.print.Viewer")*/) {
|
||||
boolean isReportViewer = Env.getContext(m_info.ctx, m_info.WindowNo, "_WinInfo_IsReportViewer").equals("Y");
|
||||
if (!isReportViewer) {
|
||||
m_lookup.clear();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -151,6 +151,7 @@ public class Viewer extends CFrame
|
|||
super(gc);
|
||||
log.info("");
|
||||
m_WindowNo = AEnv.createWindowNo(this);
|
||||
Env.setContext(re.getCtx(), m_WindowNo, "_WinInfo_IsReportViewer", "Y");
|
||||
m_reportEngine = re;
|
||||
m_AD_Table_ID = re.getPrintFormat().getAD_Table_ID();
|
||||
if (!MRole.getDefault().isCanReport(m_AD_Table_ID))
|
||||
|
|
|
@ -39,6 +39,7 @@ import org.adempiere.webui.event.DrillEvent;
|
|||
import org.adempiere.webui.event.ZoomEvent;
|
||||
import org.adempiere.webui.panel.StatusBarPanel;
|
||||
import org.adempiere.webui.report.HTMLExtension;
|
||||
import org.adempiere.webui.session.SessionManager;
|
||||
import org.compiere.model.GridField;
|
||||
import org.compiere.model.MArchive;
|
||||
import org.compiere.model.MClient;
|
||||
|
@ -145,6 +146,8 @@ public class ZkReportViewer extends Window implements EventListener {
|
|||
super();
|
||||
|
||||
log.info("");
|
||||
m_WindowNo = SessionManager.getAppDesktop().registerWindow(this);
|
||||
Env.setContext(re.getCtx(), m_WindowNo, "_WinInfo_IsReportViewer", "Y");
|
||||
m_reportEngine = re;
|
||||
m_AD_Table_ID = re.getPrintFormat().getAD_Table_ID();
|
||||
if (!MRole.getDefault().isCanReport(m_AD_Table_ID))
|
||||
|
@ -512,7 +515,7 @@ public class ZkReportViewer extends Window implements EventListener {
|
|||
*/
|
||||
public void onClose()
|
||||
{
|
||||
Env.clearWinContext(m_WindowNo);
|
||||
SessionManager.getAppDesktop().unregisterWindow(m_WindowNo);
|
||||
m_reportEngine = null;
|
||||
m_ctx = null;
|
||||
super.onClose();
|
||||
|
|
Loading…
Reference in New Issue