From 8e3b7ba645c9347daad13900f391e3c171c8cd01 Mon Sep 17 00:00:00 2001 From: deathmeat Date: Fri, 2 Mar 2007 13:07:59 +0000 Subject: [PATCH] [ 1671212 ] JasperReport Printengine Added compatibility for start and startDocumentPrint methods, following hengsin's advice. --- client/src/org/compiere/print/ReportCtl.java | 34 ++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/client/src/org/compiere/print/ReportCtl.java b/client/src/org/compiere/print/ReportCtl.java index 7d9f5dbee4..454780daf9 100644 --- a/client/src/org/compiere/print/ReportCtl.java +++ b/client/src/org/compiere/print/ReportCtl.java @@ -52,6 +52,22 @@ public class ReportCtl * @param IsDirectPrint if true, prints directly - otherwise View * @return true if created */ + static public boolean start (ProcessInfo pi, boolean IsDirectPrint) + { + return start(null, -1, pi, IsDirectPrint); + } + + /** + * Create Report. + * Called from ProcessCtl. + * - Check special reports first, if not, create standard Report + * + * @param parent The window which invoked the printing + * @param WindowNo The windows number which invoked the printing + * @param pi process info + * @param IsDirectPrint if true, prints directly - otherwise View + * @return true if created + */ static public boolean start (ASyncProcess parent, int WindowNo, ProcessInfo pi, boolean IsDirectPrint) { s_log.info("start - " + pi); @@ -143,8 +159,7 @@ public class ReportCtl preview(re); return true; } // startFinReport - - + /** * Start Document Print for Type. * Called also directly from ProcessDialog, VInOutGen, VInvoiceGen, VPayPrint @@ -153,6 +168,21 @@ public class ReportCtl * @param IsDirectPrint if true, prints directly - otherwise View * @return true if success */ + public static boolean startDocumentPrint (int type, int Record_ID, boolean IsDirectPrint) + { + return startDocumentPrint(type, Record_ID, null, -1, IsDirectPrint); + } + + /** + * Start Document Print for Type. + * Called also directly from ProcessDialog, VInOutGen, VInvoiceGen, VPayPrint + * @param type document type in ReportEngine + * @param Record_ID id + * @param parent The window which invoked the printing + * @param WindowNo The windows number which invoked the printing + * @param IsDirectPrint if true, prints directly - otherwise View + * @return true if success + */ public static boolean startDocumentPrint (int type, int Record_ID, ASyncProcess parent, int WindowNo, boolean IsDirectPrint) { ReportEngine re = ReportEngine.get (Env.getCtx(), type, Record_ID);