diff --git a/client/src/org/compiere/print/ReportCtl.java b/client/src/org/compiere/print/ReportCtl.java index ca79b7c17a..23e3a724f9 100644 --- a/client/src/org/compiere/print/ReportCtl.java +++ b/client/src/org/compiere/print/ReportCtl.java @@ -258,24 +258,25 @@ public class ReportCtl return false; } - //if(re.getPrintFormat() != null && re.getPrintFormat().getJasperProcess_ID() > 0) - if(re.getPrintFormat().getJasperProcess_ID() > 0) + if(re.getPrintFormat() != null) { - ProcessInfo pi = new ProcessInfo ("", re.getPrintFormat().getJasperProcess_ID()); - pi.setPrintPreview( !IsDirectPrint ); - pi.setRecord_ID ( Record_ID ); - // Execute Process - ProcessCtl worker = ProcessCtl.process(parent, WindowNo, pi, null); - } - else - { - createOutput(re, !IsDirectPrint); - if (IsDirectPrint) + if(re.getPrintFormat().getJasperProcess_ID() > 0) { - ReportEngine.printConfirm (type, Record_ID); + ProcessInfo pi = new ProcessInfo ("", re.getPrintFormat().getJasperProcess_ID()); + pi.setPrintPreview( !IsDirectPrint ); + pi.setRecord_ID ( Record_ID ); + // Execute Process + ProcessCtl worker = ProcessCtl.process(parent, WindowNo, pi, null); + } + else + { + createOutput(re, !IsDirectPrint); + if (IsDirectPrint) + { + ReportEngine.printConfirm (type, Record_ID); + } } } - return true; } // StartDocumentPrint