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);
}
}
Aggregations