Package org.compiere.print
Class ServerReportCtl
- java.lang.Object
-
- org.compiere.print.ServerReportCtl
-
public class ServerReportCtl extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
PARAM_PRINT_FORMAT
static String
PARAM_PRINT_INFO
static String
PARAM_PRINTER_NAME
Constants used to pass process parameters to Jasper Process
-
Constructor Summary
Constructors Constructor Description ServerReportCtl()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
runJasperProcess(int Record_ID, ReportEngine re, boolean IsDirectPrint, String printerName)
Runs a Jasper process that prints the recordstatic boolean
runJasperProcess(int Record_ID, ReportEngine re, boolean IsDirectPrint, String printerName, ProcessInfo pi)
Runs a Jasper process that prints the recordstatic boolean
start(ProcessInfo pi)
Create Report.static boolean
startDocumentPrint(int type, MPrintFormat customPrintFormat, int Record_ID, String printerName)
Start Document Print for Type with specified printer.static boolean
startDocumentPrint(int type, MPrintFormat customPrintFormat, int Record_ID, String printerName, ProcessInfo pi)
Start Document Print for Type with specified printer.static boolean
startFinReport(ProcessInfo pi)
Start Financial Report.static boolean
startStandardReport(ProcessInfo pi)
Start Standard Reportstatic boolean
startStandardReport(ProcessInfo pi, boolean IsDirectPrint)
Start Standard Report
-
-
-
Field Detail
-
PARAM_PRINTER_NAME
public static final String PARAM_PRINTER_NAME
Constants used to pass process parameters to Jasper Process- See Also:
- Constant Field Values
-
PARAM_PRINT_FORMAT
public static final String PARAM_PRINT_FORMAT
- See Also:
- Constant Field Values
-
PARAM_PRINT_INFO
public static final String PARAM_PRINT_INFO
- See Also:
- Constant Field Values
-
-
Method Detail
-
startDocumentPrint
public static boolean startDocumentPrint(int type, MPrintFormat customPrintFormat, int Record_ID, String printerName)
Start Document Print for Type with specified printer.- Parameters:
type
-customPrintFormat
-Record_ID
-printerName
-- Returns:
-
startDocumentPrint
public static boolean startDocumentPrint(int type, MPrintFormat customPrintFormat, int Record_ID, String printerName, ProcessInfo pi)
Start Document Print for Type with specified printer.- Parameters:
type
- document type in ReportEnginecustomPrintFormat
-Record_ID
- idprinterName
- Specified printer namepi
-- Returns:
- true if success
-
runJasperProcess
public static boolean runJasperProcess(int Record_ID, ReportEngine re, boolean IsDirectPrint, String printerName)
Runs a Jasper process that prints the record- Parameters:
Record_ID
-re
-IsDirectPrint
-printerName
-- Returns:
-
runJasperProcess
public static boolean runJasperProcess(int Record_ID, ReportEngine re, boolean IsDirectPrint, String printerName, ProcessInfo pi)
Runs a Jasper process that prints the record- Parameters:
Record_ID
-re
-IsDirectPrint
-printerName
-pi
-- Returns:
-
start
public static boolean start(ProcessInfo pi)
Create Report. Called from ProcessCtl. - Check special reports first, if not, create standard Report- Parameters:
pi
- process info- Returns:
- true if created
-
startStandardReport
public static boolean startStandardReport(ProcessInfo pi, boolean IsDirectPrint)
Start Standard Report. - Get Table Info and submit- Parameters:
pi
- Process InfoIsDirectPrint
- if true, prints directly - otherwise View- Returns:
- true if OK
-
startStandardReport
public static boolean startStandardReport(ProcessInfo pi)
Start Standard Report. - Get Table Info and submit.
A report can be created from:- attached MPrintFormat, if any (see
ProcessInfo.setTransientObject(Object)
,ProcessInfo.setSerializableObject(java.io.Serializable)
- process information (AD_Process.AD_PrintFormat_ID, AD_Process.AD_ReportView_ID)
- Parameters:
pi
- Process Info- Returns:
- true if OK
- attached MPrintFormat, if any (see
-
startFinReport
public static boolean startFinReport(ProcessInfo pi)
Start Financial Report.- Parameters:
pi
- Process Info- Returns:
- true if OK
-
-