Search in sources :

Example 1 with MReport

use of org.compiere.report.MReport in project adempiere by adempiere.

the class ZkReportViewerProvider method openViewer.

public void openViewer(ReportEngine report) {
    if (report.getPrintInfo().getAD_Process_ID() == 202 && MSysConfig.getBooleanValue("SMART_REPORT", Boolean.FALSE)) {
        ProcessInfo processInfo = report.getProcessInfo();
        MReport m_report = new MReport(report.getCtx(), processInfo.getRecord_ID(), processInfo.getTransactionName());
        ProcessInfoParameter[] pi = processInfo.getParameter();
        // Goodwill BF: report title is taken wrongly from other report if report line set is shared 
        // - passing PA_Report_ID instead of PA_ReportLineSet_ID
        Window smjviewer = new SMJReportViewer(processInfo.getAD_PInstance_ID(), processInfo.getTransactionName(), m_report.getPA_Report_ID(), pi[0].getParameterAsInt(), report.getPrintFormat().getAD_PrintFont_ID(), m_report.getColumnSet().getColumns());
        smjviewer.setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED);
        smjviewer.setAttribute(Window.INSERT_POSITION_KEY, Window.INSERT_NEXT);
        SessionManager.getAppDesktop().showWindow(smjviewer);
    } else {
        Window viewer = new ZkReportViewer(report, report.getName());
        viewer.setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED);
        viewer.setAttribute(Window.INSERT_POSITION_KEY, Window.INSERT_NEXT);
        SessionManager.getAppDesktop().showWindow(viewer);
    }
}
Also used : MReport(org.compiere.report.MReport) Window(org.adempiere.webui.component.Window) ProcessInfoParameter(org.compiere.process.ProcessInfoParameter) ProcessInfo(org.compiere.process.ProcessInfo) SMJReportViewer(org.adempiere.webui.component.SMJReportViewer)

Aggregations

SMJReportViewer (org.adempiere.webui.component.SMJReportViewer)1 Window (org.adempiere.webui.component.Window)1 ProcessInfo (org.compiere.process.ProcessInfo)1 ProcessInfoParameter (org.compiere.process.ProcessInfoParameter)1 MReport (org.compiere.report.MReport)1