Class jet.bean.JREngine

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----jet.bean.JREngine

public class JREngine
extends Panel
implements externally

Variable Index

 o vDebug
The constant for setShowInfoLevel.
 o vError
The constant for setShowInfoLevel.
 o vOff
The constant for setShowInfoLevel.

Constructor Index

 o JREngine()
Default constructor.

Method Index

 o deleteWherePortion(String)
Removes the WHERE portion from  the current catalog specified by the name String, updates and saves the catalog after the deleting.
This method is not available in JReport Express Engine.
 o exit()
Exits the current report engine, the method Calling  will delete the temporary file that is created by the report engine.
 o exportToHtml(String)
Exports the JReport result file (with the .rst extension) to a HTML file.
This method is not available in JReport Express Engine.
 o exportToHtml(String, String)
Exports the JReport result file (with the .rst extension) to a HTML file.
This method is not available in JReport Express Engine.
 o exportToPdf(String)
Exports the JReport result file (with the .rst extension) to a PDF file.
This method is not available in JReport Express Engine.
 o exportToPdf(String, String)
Exports the JReport result file (with the .rst extension) to a PDF file.
This method is not available in JReport Express Engine.
 o exportToText(String, boolean)
Exports the JReport result file (with the .rst extension) to a TEXT file.
This method is not available in JReport Express Engine.
 o exportToText(String, String, boolean)
Exports the JReport result file (with the .rst extension) to a TEXT file.
This method is not available in JReport Express Engine.
 o getAllHtmlFile()
Gets all html files that were generated by this engine.
This method is not available in JReport Express Engine.
 o getAvailableQueryFields()
Gets all the available fields, including DB fields, formulas and parameters in this query.
This method is not available in JReport Express Engine.
 o getAvailableWherePortions()
Gets the enumeration of names for all the WHERE portions in the current catalog.
This method is not available in JReport Express Engine.
 o getCatName()
Gets the name of the current catalog .
 o getDataDriver()
Gets the data driver of the report which the engine will run.
This method is not available in JReport Express Engine.
 o getParamFile()
Gets the name of the parameter value file.
 o getParamValues()
Gets the parameter values of the report.
 o getReportHome()
Gets the report home path where the report.ini and other JReport system files reside.
 o getReportName()
Gets the report name which the engine will run.
 o getResultFile()
Gets the name of the result file which will be generated by Engine.
 o getStatus()
Gets the status when or after the report engine runs.
 o readExternal(ObjectInput)
 
 o runReport()
Runs current report .
 o saveWherePortion(String, String)
Adds and saves the specified WHERE portion to the current catalog.
This method is not available in JReport Express Engine.
 o setCatName(String)
Sets the name of the catalog which contains all the required objects used in the report.
 o setDataDriver(String)
Sets the data driver of the report which the engine will run.
This method is not available in JReport Express Engine.
 o setLoadReport(String)
Loads the report, the method calling will make the report engine run.
 o setLogFile(String)
Sets the name of the log file.
 o setNamedWherePortion(String)
Sets the WHERE portion specified by the where portion name from the report catalog to current report query.
This method is not available in JReport Express Engine.
 o setParamFile(String)
Sets the name of the parameter value file.
 o setParamValues(String)
Sets the parameter values of the report.
 o setReportHome(String)
Sets the report home path where the report.ini and other JReport system files reside.
 o setReportName(String)
Sets the report name which the engine will run.
 o setResultFile(String)
Specifies the name of the result file which will be generated by Engine.
 o setShowInfoLevel(int)
Sets show debug information level.
 o setWherePortion(String)
Sets the WHERE portion in string format to the current report query.
This method is not available in JReport Express Engine.
 o writeExternal(ObjectOutput)
 

Variables

 o vOff

 public static final int vOff
The constant for setShowInfoLevel. specifies a turning off debug and an error information.
See Also:
setShowInfoLevel

 o vDebug

 public static final int vDebug
The constant for setShowInfoLevel. specifies a turning on debug information.
See Also:
setShowInfoLevel

 o vError

 public static final int vError
The constant for setShowInfoLevel. specifies a turning on error information.
See Also:
setShowInfoLevel

Constructors

 o JREngine

 public JREngine()
Default constructor.

Methods

 o getReportHome

 public String getReportHome()
Get the report home path where the report.ini and other JReport system files reside.
Returns:
the report home path where the report.ini and other JReport system files reside.
See Also:
setReportHome

 o setReportHome

 public void setReportHome(String reportHome)
Set the report home path where the report.ini and other JReport system files reside.
Parameters:
reportHome - the home path where the report.ini and other JReport system files reside.
See Also:
getReportHome

 o getReportName

 public String getReportName()
Get the report name which the engine will run.
Returns:
reportName the report name which the engine will run.
See Also:
setReportName

 o setReportName

 public void setReportName(String reportName)
Set the report name which the engine will run.
Parameters:
reportName - the report name which the engine will run.
See Also:
getReportName

 o setCatName

 public void setCatName(String catName)
Set the name of the catalog which contains all the required objects used in the report.
Parameters:
catName - the name of the catalog which contains all the required objects used in the report.
See Also:
getCatName

 o getCatName

 public String getCatName()
Get the name of current catalog .
Returns:
the name of the catalog which contains all the required objects used in the report.
See Also:
setCatName

 o getParamValues

 public String getParamValues()
Get the parameter values of the report.
Returns:
the string containing the parameter values, separated by comma (',').
See Also:
setParamValues

 o setParamValues

 public void setParamValues(String paramValues)
Set the parameter values of the report.
Parameters:
paramValues - the string containing the parameter values, separated by comma (',').
See Also:
getParamValues

 o getParamFile

 public String getParamFile()
Get the name of the parameter value file.
Returns:
the name of the parameter value file. This will be ignored if paramValues is specified.
See Also:
setParamFile

 o setParamFile

 public void setParamFile(String paramFile)
Set the name of the parameter value file.
Parameters:
paramFile - the name of the parameter value file. This will be ignored if paramValues is specified.
See Also:
getParamFile

 o getResultFile

 public String getResultFile()
Get the name of the result file which will be generated by Engine.
Returns:
the name of the result file.
See Also:
setResultFile

 o setResultFile

 public void setResultFile(String resultFile)
Specify the name of the result file which will be generated by Engine.
Parameters:
resultFile - the name of the result file.
See Also:
getResultFile

 o setDataDriver

 public void setDataDriver(String url)
Set the data driver of the report which the engine will run.
Parameters:
url - the data driver of the report which the engine will run.
See Also:
getDataDriver

 o getDataDriver

 public String getDataDriver()
Get the data driver of the report which the engine will run.
Returns:
the data driver of the report which the engine will run.
See Also:
setDataDriver

 o setLoadReport

 public void setLoadReport(String loadReport)
Load the report, the method calling  will make the report engine run.
Parameters:
loadReport - indicates whether to load the report, if yes, then load.

 o runReport

 public void runReport()
Run current report .

 o exit

 public void exit()
Exit the current report engine, the method calling  will delete the temporary file that is created by the report engine.

 o setShowInfoLevel

 public void setShowInfoLevel(int level)
Set show debug information level.
Parameters:
level - the debug level

the debug level are vDebug, vError and vOff used for showing debug information, error information and turning off debug and error information.

See Also:
setLogFile

 o setLogFile

 public boolean setLogFile(String fileName)
Set the name of the log file. The debug and error information will be saved to this file.
Parameters:
fileName - the log file name

LogFileName specifies where the debug, error and other information will go. LogFileName contains both the path and the file name. If no path is specified, the current path is used. If no file name is specified, the file jreport.log is used

Returns:
true if successful
See Also:
setShowInfoLevel

 o getStatus

 public String getStatus()
Get the status when or after the report engine runs.

 o exportToHtml

 public boolean exportToHtml(String rstFileName,
                             String htmlFileName)
Export the JReport result file (with the .rst extension) to a HTML file.
Parameters:
rstFileName - the input result file name.
htmlFileName - the output HTML file name.
Returns:
true if exportation is successful
See Also:
exportToPdf, exportToText

 o exportToHtml

 public boolean exportToHtml(String htmlFileName)
Export the  JReport result file (with the .rst extension) to a HTML file.
Parameters:
htmlFileName - the output HTML file name.
Returns:
true if exportation is  successful
See Also:
exportToPdf, exportToText

 o getAllHtmlFile

 public Vector getAllHtmlFile()
Get all html files that were generated by this engine.
See Also:
exportToHtml

 o exportToPdf

 public boolean exportToPdf(String rstFileName,
                            String pdfFileName)
Export the JReport result file (with the .rst extension) to a PDF file.
Parameters:
rstFileName - the input result file name.
pdfFileName - the output PDF file name.
Returns:
true if exportation is successful
See Also:
exportToHtml, exportToText

 o exportToPdf

 public boolean exportToPdf(String pdfFileName)
                         
Export the JReport result file (with the .rst extension) to a PDF file.
Parameters:
pdfFileName - the output PDF file name.
Returns:
true if exportation successful
See Also:
exportToHtml, exportToText

 o exportToText

 public boolean exportToText(String rstFileName,
                             String textFileName,
                             boolean isNormalText)
Export the JReport result file (with the .rst extension) to a TEXT file.
Parameters:
rstFileName - the input result file name.
textFileName - the output TEXT file name.
isNormalText - is to set whether this text file is a  normal text format or a standard data format

the standard data format text file is the text file that each row of it represents each record in the report. It can be used as a text datasource to exchange data with other applications.

Returns:
true if exportation is successful
See Also:
exportToHtml, exportToPdf

 o exportToText

 public boolean exportToText(String textFileName,
                             boolean isNormalText)
Export the current report to a TEXT file.
Parameters:
textFileName - the output TEXT file name.
isNormalText - is to set whether this text file is a normal text format or a standard data format

the standard data format text file is a text file that each row of it represents each record in the report. It can be used as a text datasource to exchange data with other applications.

Returns:
true if exportation is successful
See Also:
exportToHtml, exportToPdf

 o setNamedWherePortion

 public void setNamedWherePortion(String name)
Set the WHERE portion specified by the where portion name from the report catalog to the current report query.
Parameters:
name - the name of one of several WHERE portions saved in the current catalog

This named WHERE portion will be appended to the end of the QUERY associated with the definition by either: ADDing the portion of the WHERE clause to any joining statements that are defined in the QUERY or by adding the WHERE clause where the portion of the WHERE clause you have specified becomes the entire WHERE clause.

See Also:
setWherePortion, saveWherePortion, deleteWherePortion, getAvailableWherePortions

 o setWherePortion

 public void setWherePortion(String where)
Set the WHERE portion to the query.
Parameters:
where - the WHERE portion in string format

The named WHERE portion will be appended to the end of the QUERY associated with the definition by either: ADDing the portion of the WHERE clause to any joining statements that are defined in the QUERY or by adding the WHERE clause where the portion of the WHERE clause you have specified becomes the entire WHERE clause.

See Also:
setNamedWherePortion

 o saveWherePortion

 public boolean saveWherePortion(String strName,
                                 String strSQL)
Add and save the specified WHERE portion to the current catalog.
Parameters:
strName - the name of WHERE portion.
strSQL - the WHERE portion string
Returns:
true if the where portion saved successfully. Note: this method is required by Novell.
See Also:
setNamedWherePortion, deleteWherePortion, getAvailableWherePortions

 o deleteWherePortion

 public boolean deleteWherePortion(String strName)
Removes the WHERE portion from the current catalog specified by the name String, updates and saves the catalog after the deletion.
Parameters:
strName, - the name of WHERE portion.
Returns:
true if the WHERE portion deleted successfully. Note: this method is required by Novell.
See Also:
setNamedWherePortion, saveWherePortion, getAvailableWherePortions

 o getAvailableWherePortions

 public Enumeration getAvailableWherePortions()
Gets the enumeration of names for all the WHERE portions from the current catalog.
Returns:
a enumeration of the names of WHERE portions. Note: this method is required by Novell.
See Also:
setNamedWherePortion, saveWherePortion, deleteWherePortion

 o getAvailableQueryFields

 public Enumeration getAvailableQueryFields()
Get all the available fields, including DB fields, formulas and parameters in this query.
Parameters:
strQueryName, - name of the query.
Returns:
a enumeration that contains string in format "TableName.FldName", if failed, return null Note: this method is required by Novell.