Adempiere 3.5.2a

org.compiere.report
Class ReportStarter

java.lang.Object
  extended by org.compiere.report.ReportStarter
All Implemented Interfaces:
ClientProcess, ProcessCall

public class ReportStarter
extends Object
implements ProcessCall, ClientProcess

Author:
rlemeill originaly coming from an application note from compiere.co.uk --- Modifications: Allow Jasper Reports to be able to be run on VPN profile (i.e: no direct connection to DB). Implemented ClientProcess for it to run on client., Ashley Ramdass, victor.perez@e-evolution.com
See Also:
1906632 http://sourceforge.net/tracker/?func=detail&atid=879335&aid=1906632&group_id=176962

Constructor Summary
ReportStarter()
           
 
Method Summary
protected  void addProcessParameters(int AD_PInstance_ID, Map<String,Object> params, String trxName)
           
protected  Connection getConnection()
          Returns the Server Connection if direct connection is not available (VPN, WAN, Terminal) and thus query has to be run on server only else return a direct connection to DB.
 org.compiere.report.ReportStarter.ReportData getReportData(ProcessInfo pi, String trxName)
           
protected  File getReportFile(String reportPath)
           
protected  File getReportFile(String reportPath, String reportType)
           
static JRViewerProvider getReportViewerProvider()
          Get the current jasper report viewer provider
protected  org.compiere.report.ReportStarter.JasperData processReport(File reportFile)
           
protected  void reportResult(int AD_PInstance_ID, String errMsg, String trxName)
           
static void setReportViewerProvider(JRViewerProvider provider)
          Set jasper report viewer provider.
 boolean startProcess(Properties ctx, ProcessInfo pi, Trx trx)
          Start the process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportStarter

public ReportStarter()
Method Detail

getConnection

protected Connection getConnection()
Returns the Server Connection if direct connection is not available (VPN, WAN, Terminal) and thus query has to be run on server only else return a direct connection to DB. Notes: Need to refactor and integrate in DB if confirmed to be working as expected.

Returns:
Connection DB Connection

startProcess

public boolean startProcess(Properties ctx,
                            ProcessInfo pi,
                            Trx trx)
Start the process. Called then pressing the Process button in R_Request. It should only return false, if the function could not be performed as this causes the process to abort.

Specified by:
startProcess in interface ProcessCall
Parameters:
ctx - context
pi - Compiere standard process info
trx -
Returns:
true if success

getReportFile

protected File getReportFile(String reportPath,
                             String reportType)
Parameters:
reportPath -
reportType -
Returns:
the abstract file corresponding to typed report

getReportFile

protected File getReportFile(String reportPath)
Parameters:
reportPath -
Returns:
the abstract file corresponding to report

reportResult

protected void reportResult(int AD_PInstance_ID,
                            String errMsg,
                            String trxName)
Parameters:
AD_PInstance_ID -
errMsg -

processReport

protected org.compiere.report.ReportStarter.JasperData processReport(File reportFile)
Parameters:
reportFile -
Returns:

addProcessParameters

protected void addProcessParameters(int AD_PInstance_ID,
                                    Map<String,Object> params,
                                    String trxName)

getReportData

public org.compiere.report.ReportStarter.ReportData getReportData(ProcessInfo pi,
                                                                  String trxName)
Parameters:
ProcessInfo -
Returns:
ReportData

setReportViewerProvider

public static void setReportViewerProvider(JRViewerProvider provider)
Set jasper report viewer provider.

Parameters:
provider -

getReportViewerProvider

public static JRViewerProvider getReportViewerProvider()
Get the current jasper report viewer provider

Returns:
JRViewerProvider

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.