From 2345c884815e854af5548f42d14b1ff507f751d3 Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Mon, 5 Aug 2013 17:50:17 +0800 Subject: [PATCH] IDEMPIERE-1229 Purchase Order print format needs to be removed from SO window - maintain the old public method signature --- .../src/org/compiere/print/MPrintFormat.java | 12 +++++- .../src/org/compiere/print/ReportCtl.java | 42 +++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/print/MPrintFormat.java b/org.adempiere.base/src/org/compiere/print/MPrintFormat.java index c6ea706dac..8576718045 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintFormat.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintFormat.java @@ -61,7 +61,7 @@ public class MPrintFormat extends X_AD_PrintFormat /** * */ - private static final long serialVersionUID = -4515887660012047223L; + private static final long serialVersionUID = 2826550741107576964L; /** * Public Constructor. @@ -1157,6 +1157,16 @@ public class MPrintFormat extends X_AD_PrintFormat } //end vpj-cd e-evolution + /** + * @param AD_Table_ID + * @param AD_Client_ID use -1 to retrieve from all client + * @param trxName + */ + public static RowSet getAccessiblePrintFormats (int AD_Table_ID, int AD_Client_ID, String trxName) + { + return getAccessiblePrintFormats(AD_Table_ID, -1, AD_Client_ID, trxName); + } + /** * @param AD_Table_ID * @param AD_Window_ID diff --git a/org.adempiere.ui/src/org/compiere/print/ReportCtl.java b/org.adempiere.ui/src/org/compiere/print/ReportCtl.java index f23ede203c..dbac1f4ef1 100644 --- a/org.adempiere.ui/src/org/compiere/print/ReportCtl.java +++ b/org.adempiere.ui/src/org/compiere/print/ReportCtl.java @@ -169,6 +169,19 @@ public class ReportCtl * @param IsDirectPrint if true, prints directly - otherwise View * @return true if OK */ + static public boolean startStandardReport (ProcessInfo pi, boolean IsDirectPrint) + { + return startStandardReport(pi, -1, IsDirectPrint); + } + + /************************************************************************** + * Start Standard Report. + * - Get Table Info & submit + * @param pi Process Info + * @param WindowNo The windows number which invoked the printing + * @param IsDirectPrint if true, prints directly - otherwise View + * @return true if OK + */ static public boolean startStandardReport (ProcessInfo pi, int WindowNo, boolean IsDirectPrint) { pi.setPrintPreview(!IsDirectPrint); @@ -187,6 +200,24 @@ public class ReportCtl * @param IsDirectPrint if true, prints directly - otherwise View * @return true if OK */ + static public boolean startStandardReport (ProcessInfo pi) + { + return startStandardReport(pi, -1); + } + + /************************************************************************** + * Start Standard Report. + * - Get Table Info & submit.
+ * A report can be created from: + *
    + *
  1. attached MPrintFormat, if any (see {@link ProcessInfo#setTransientObject(Object)}, {@link ProcessInfo#setSerializableObject(java.io.Serializable)} + *
  2. process information (AD_Process.AD_PrintFormat_ID, AD_Process.AD_ReportView_ID) + *
+ * @param pi Process Info + * @param WindowNo The windows number which invoked the printing + * @param IsDirectPrint if true, prints directly - otherwise View + * @return true if OK + */ static public boolean startStandardReport (ProcessInfo pi, int WindowNo) { ReportEngine re = null; @@ -227,6 +258,17 @@ public class ReportCtl * @param pi Process Info * @return true if OK */ + static public boolean startFinReport (ProcessInfo pi) + { + return startFinReport(pi, -1); + } + + /** + * Start Financial Report. + * @param pi Process Info + * @param WindowNo The windows number which invoked the printing + * @return true if OK + */ static public boolean startFinReport (ProcessInfo pi, int WindowNo) { @SuppressWarnings("unused")