jet.server.api.engine
Interface ReportEngine


public interface ReportEngine

Interface ReportEngine can do some operations with engine, such as run and export report, set connection, etc.


Method Summary
 boolean addFileQuery(java.lang.String strName, java.io.File flPath)
          Add the specified file query to the current catalog.
 boolean addFileQuery(java.lang.String strName, java.io.File flPath, java.lang.String sourceName)
          Add the specified file query to the current catalog.
 void closeLog()
          close the log stream.
 void configMailServer(java.lang.String SMTPServerIP, java.lang.String MyMailAddress, int SMTPServerPort)
          Configures the mail server.
 boolean deleteWherePortion(java.lang.String strName)
          Removes the specified where portion and save the catalog.
 boolean deleteWherePortion(java.lang.String strName, java.lang.String sourceName)
          Removes the specified where portion and save the catalog.
 void exit()
          When you want to quit from JReport Engine Bean, you should call this method.
 boolean exportToDhtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser, boolean bincdrilldownfile, boolean noMargin, java.lang.String title, int resolution, int overflowType)
          Exports the current report to HTML.
 boolean exportToDhtml(java.lang.String rstFileName, java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser, boolean bincdrilldownfile, boolean noMargin, java.lang.String title, int resolution, int overflowType)
          Exports result report file(with the .rst extension)to a HTML file.
 boolean exportToFax(ExportInfo info, java.lang.String portStr, java.lang.String initStr, int iDialing, int iFlowControl, java.lang.String flowCommand, int iClass, int txtTimeOut, int txtRetries, boolean q_best, boolean q_normal, boolean q_fast, boolean isAddCover, java.lang.String faxnum, java.lang.String from, java.lang.String to, java.lang.String company, java.lang.String phone, java.lang.String date, java.lang.String re, java.lang.String comments, boolean urgent, boolean review, boolean comment, boolean reply)
          Exports the current report to fax.
 boolean exportToFax(java.lang.String portStr, java.lang.String initStr, int iDialing, int iFlowControl, java.lang.String flowCommand, int iClass, int txtTimeOut, int txtRetries, boolean q_best, boolean q_normal, boolean q_fast, boolean isAddCover, java.lang.String faxnum, java.lang.String from, java.lang.String to, java.lang.String company, java.lang.String phone, java.lang.String date, java.lang.String re, java.lang.String comments, boolean urgent, boolean review, boolean comment, boolean reply)
          Exports the current report to fax.
 boolean exportToHtml(ExportInfo info, HtmlParameter param)
          Exports the report to HTML file.
 boolean exportToHtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser, boolean bincdrilldownfile, boolean noMargin, java.lang.String title, int resolution, int overflowType)
          Exports the current report to HTML.
 boolean exportToHtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser, boolean bincdrilldownfile, boolean noMargin, java.lang.String title, int resolution, int overflowType, int chartFormat)
          Exports the current report to HTML.
 boolean exportToHtml(java.lang.String rstFileName, java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser, boolean bincdrilldownfile, boolean noMargin, java.lang.String title, int resolution, int overflowType)
          Exports result report file(with the .rst extension)to a HTML file.
 boolean exportToHtml(java.lang.String rstFileName, java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser, boolean bincdrilldownfile, boolean noMargin, java.lang.String title, int resolution, int overflowType, int chartFormat)
          Exports result report file(with the .rst extension)to a HTML file.
 void exportToMail(java.lang.String from, java.lang.String rcpt, java.lang.String cc, java.lang.String bcc, java.lang.String subject, java.lang.String comments, boolean compress, int rptformat, boolean noMargin, int udwidth, int udheight, boolean isSimPrintMode, int isCompressImage, boolean isDataOnlyXML, java.lang.String xsdFile, boolean hasHeadFoot, boolean isGifTrans, boolean bTxtCompress, boolean isTable, int isWordWrap, boolean isBiff8, int param, boolean bToc, boolean bDrill, java.lang.String encoding)
          Exports the current report to mail.
 java.awt.print.Pageable ExportToPageable()
          export to Pageable object.
 boolean exportToPDF(ExportInfo info, PDFParameter param)
          Exports the report to PDF file.
 boolean exportToPdf(java.lang.String pdfFileName, boolean noMargin, boolean isSimPrintMode, int isCompressImage, boolean isTransparent, boolean bToc, boolean bDrill, java.lang.String password)
          Exports the current report to a PDF file.
 boolean exportToPdf(java.lang.String rstFileName, java.lang.String pdfFileName, boolean noMargin, boolean isSimPrintMode, int isCompressImage, boolean isTransparent, boolean bToc, boolean bDrill, java.lang.String password)
          Exports the current report to a PDF file.
 boolean exportToPS(ExportInfo info, PSParameter param)
          Exports the report to postscript file.
 boolean exportToPS(java.lang.String psFileName, boolean noMargin)
          Exports the current report to a PS(PostScript) file.
 boolean exportToPS(java.lang.String rstFileName, java.lang.String psFileName, boolean noMargin)
          Exports report result file(with the .rst extension)to a PS(PostScript) file.
 boolean exportToRst(java.util.Map reportInfo, java.lang.String rstFileName, boolean isZip)
          save reports and views to a .rst file.
 boolean exportToRst(java.lang.String rstFileName)
          save current report to a .rst file.
 boolean exportToRst(java.lang.String loadRstFileName, java.lang.String rstFileName)
          load a .rst file and save to another .rst file.
 boolean exportToRtf(ExportInfo info, RtfParameter param)
          Exports the report to RTF file.
 boolean exportToRtf(java.lang.String rtfFileName, boolean noMargin)
          Exports the current report to RTF(Rich Text Format).
 boolean exportToRtf(java.lang.String rstFileName, java.lang.String rtfFileName, boolean noMargin)
          Exports report result file(with the .rst extension)to RTF(Rich Text Format).
 boolean exportToText(ExportInfo info, TextParameter param)
          Exports the report to text file.
 boolean exportToText(java.lang.String textFileName, boolean isNormalText, boolean isRepeat, char delimiter, int udchWidth, int udchHeight, boolean compress, int resolution, boolean quoteMark, boolean hasHeadFoot, boolean forWindows)
          Exports current report to a TEXT file.
 boolean exportToText(java.lang.String rstFileName, java.lang.String textFileName, boolean isNormalText, boolean isRepeat, char delimiter, int udchWidth, int udchHeight, boolean compress, int resolution, boolean quoteMark, boolean hasHeadFoot, boolean forWindows)
          Exports result report file(with the .rst extension)to a TEXT file.
 boolean exportToXls(ExportInfo info, ExcelParameter param)
          Exports the report to Excel file.
 boolean exportToXls(java.lang.String xlsFileName, int isWordWrap, boolean isBiff8, int param, boolean shareLabel)
          Exports report to BIFF(Binary File Format).
 boolean exportToXls(java.lang.String rstFileName, java.lang.String xlsFileName, int isWordWrap, boolean isBiff8, int param, boolean shareLabel)
          Exports report result file(with the .rst extension)to BIFF(Binary File Format).
 boolean exportToXML(ExportInfo info, XmlParameter param)
          Exports the report to xml file.
 boolean exportToXML(java.lang.String xmlFileName, boolean isOnlyData, java.lang.String existXSFile)
          Exports the current report to XML.
 boolean exportToXML(java.lang.String rstFileName, java.lang.String xmlFileName, boolean isOnlyData, java.lang.String existedSchemaFile)
          Exports the specified report result to XML.
 boolean exportToXMLObject(boolean isOnlyData, java.lang.String existedSchemaFile)
          Initialize exporting the current report to XML Element.
 boolean exportToXMLObject(java.lang.String rstFileName, boolean isOnlyData, java.lang.String existedSchemaFile)
          Initialize exporting the specified report result to XML Element.
 java.util.Vector getAllHtmlFile()
          Returns all html files that are generated by exportToHtml.
 java.util.Vector getAllPdfFile()
          Returns all pdf files that are generated by exportToPdf.
 java.util.Vector getAllRtfFile()
          return the output file of export to rtf
 java.util.Vector getAllXlsFile()
          return the output file of export to xls
 java.util.Vector getAllXMLFile()
          return the output file of export to xml
 java.util.Vector getAvailableLocales(java.lang.String clt)
          Gets all of the Locales that current report supported.
 java.util.Enumeration getAvailableQueryFields()
          Gets the available fields of the query The available fields include: 1.
 java.util.Enumeration getAvailableWherePortions()
          Gets the enumeration of all the where portion names in the catalog.
 java.lang.String getCatName()
          Gets the name of the catalog.
 java.lang.String getClientName()
          Gets the client name.
 Communicator getCommunicator()
          Gets Communicator object
 Communicator getCommunicator(boolean security)
          Gets Communicator object
 Communicator getCommunicator(java.lang.String filename, int[] pageNums)
          Gets Communicator object
 int getConvertFromEncoding()
          Gets the original encoding
 int getConvertToEncoding()
          Gets the destination encoding
 java.lang.String getDataDriver()
          Gets the data driver of the report which the engine will run.
 java.util.Vector getDetailsFields()
          Get all the fields information in the details section including fields in all subreport a field informaiton including field name and type
 java.lang.String getHelpPath()
          Gets the help path.
 int getID()
          Gets id of engine, the id is an unique identification of engine
 java.lang.String getJoinCondition()
          Get join portion condition caluse in SQL statement.
 java.lang.String getLoadReport()
          Gets the load report flag.
 java.util.Locale getLocale()
          Gets locale
 int[] getPageNumbers()
          Gets the page numbers of page level security.
 int getPageOrientation()
          Gets the page orientation.
 java.util.Hashtable getParamDescs()
          Get all objects of ParamDesc the report.
 java.lang.String getParamFile()
          Sets the name of the parameter values file.
 java.util.Hashtable getParamToSubRpt()
          Get the parameter name to the subreport name relationship.
 java.lang.String getParamValues()
          Gets the parameter values of the report.
 java.lang.String getPrintStatus()
          Get print status after printing.
 java.lang.String getReason()
          Get the error reason after occur error.
 int getRecordLength()
          Get the length of record
 Communicator getReportCommunicator()
          Gets Communicator object of report
 java.lang.String getReportHome()
          Gets the report home path where the report.ini and other JReport system files exist.
 java.lang.String getReportName()
          Gets the name of report.
 java.util.Vector getReportParams(java.lang.String userName)
          Gets all parameters in this report.
 java.util.Vector getReportParams(java.lang.String userName, boolean bFirstLevel)
          Gets all parameters in this report.
 java.util.Vector getReportParams(java.lang.String userName, java.lang.String paramName, java.lang.String paramValue, boolean isAll)
          Gets parameters related to the parameter specified by param and value.
 java.lang.String getResultFile()
          Gets the name of the result file which will be generated by JReport Engine Bean.
 java.lang.String getResultSet(java.lang.String url)
          Gets the cach query result set of the report which the engine will run.
 java.util.Hashtable getRptDescs()
          return current universe's report Description, key is report file name(with" .cls"), value is the description.
 java.lang.String getSID()
          Gets security identifier of page level security.
 boolean getSingleThread()
          Checks current engine is whether single-thread.
 java.lang.String getSQL()
          Gets the sql statement of this report.
 java.lang.String getStatus()
          Gets the status after an action.
 java.util.Vector getStyleGroupNames()
          Get all style group names in template
 java.lang.String getTemplatePath()
          Gets the template path.
 java.lang.String getTempPath()
          Gets the temporary path.
 java.lang.Throwable getThrowable()
          Gets the throwable error information.
 boolean getThrowException()
          return true if the engine throws exception while program throws exception.
 java.util.TimeZone getTimeZone()
          Gets timezone
 int getTotalPageNumber()
          Gets the total page number of the report.
 java.lang.String getWhereCondition()
          Get where portion conditions caluse in SQL statement.
 java.lang.String getWherePortionsSQL(java.lang.String nameOfWherePortion)
          Gets the specified where portion.
 java.lang.String getWherePortionsSQL(java.lang.String nameOfWherePortion, java.lang.String sourceName)
          Gets the specified where portion.
 boolean hasPageSecurity()
          Checks the current report security.
 boolean hasParameter()
          check whether current report have parameters.
 boolean loadReport()
          load report
 void modifyUserInfo(java.lang.String strUserName, java.lang.String strPassword, java.lang.String dataSourceName)
          Modifies the User and Password information in the specified connection description.
 boolean modifyWherePortion(java.lang.String strName, java.lang.String strSQL)
          Modifies the specified where portion in the current query and save the catalog.
 boolean modifyWherePortion(java.lang.String strName, java.util.Vector vecGroups)
          Modifies the specified where portion in the current query and save the catalog.
 void printReport(java.lang.Object printJob, java.lang.Object pageFormat, boolean bInteractive, boolean bInBackground, boolean bUseJDK11, boolean bSeparateLargePage, java.lang.String jobName, java.lang.String printer)
          Prints the report with the special parameters.
 org.w3c.dom.Element publishXMLNextPage()
          return next xml object when export to xml object.
 void runReport()
          Launches to run JReport Engine Bean.
 void runReport(boolean genRst)
          parameter genRst decide to output rst file or not, during runReport.
 void runReport(java.util.Vector vReportName)
          run specified reports in the report set.
 boolean save(java.lang.String resultFileName)
          save current report to result file.
 boolean saveCatalog()
          Saves the catalog
 boolean saveWherePortion(java.lang.String strName, java.lang.String strSQL)
          Saves the specified where portion to the current query and save the catalog.
 boolean saveWherePortion(java.lang.String strName, java.lang.String dataSourceName, java.lang.String strQueryName, java.lang.String strSQL)
          Saves the where portion to the specified query and save the catalog.
 boolean saveWherePortion(java.lang.String strName, java.lang.String dataSourceName, java.lang.String strQueryName, java.util.Vector vecGroups)
          Save the where portion to the specified query and save the catalog.
 boolean saveWherePortion(java.lang.String strName, java.util.Vector vecGroups)
          Saves the specified where portion to the current query and save the catalog.
 void sendNormalMail(java.lang.String from, java.lang.String rcpt, java.lang.String cc, java.lang.String bcc, java.lang.String subject, java.lang.String comments, boolean compress, java.util.Vector additionfiles)
          Export current report engine that has already run to mail.
 void setCatName(java.lang.String catName)
          Sets the name of the catalog.
 void setClientName(java.lang.String name)
          Sets the client name.
 void setConnection(java.sql.Connection userDbConnection, boolean fetchSupportInfo)
          Set the connection required to run the engine.
 void setConnection(java.lang.String strURL, java.lang.String strUID, java.lang.String strPSWD, java.lang.String strJdbcDriver, boolean fetchSupportInfo)
          Sets the connection required to run the engine.
 void setConvertEncoding(int fromEncoding, int toEncoding)
          Sets the original encoding and the destination encoding when having encoding converting
 void setDataDriver(java.lang.String url)
          Sets the data driver of the report dataset which the engine will use.
 void setEncoding(java.lang.String encoding)
          Sets current encoding.
 void setFetchSupportInfo(boolean fetchSupportInfo)
          Set true to get the user support information.
 void setHelpPath(java.lang.String sHelpPath)
          Sets the help path.
 void setLoadReport(java.lang.String loadReport)
          Enables/disables to run the report.
 void setLocale(java.util.Locale currentLocale)
          Sets current locale.
 void setLocale(java.lang.String language, java.lang.String country)
          Sets current Locale by string language and country.
 boolean setLogFile(java.lang.String fileName)
          Sets the log file.
 void setNamedWherePortion(java.lang.String name)
          Sets the where portion name in the query.
 void setPageNumbers(int[] pageNums)
          Sets the page numbers of page level security.
 void setParamFile(java.lang.String paramFile)
          Sets the name of the parameter values file.
 void setParamValues(java.lang.String paramValues)
          Sets the parameter values of the report.
 void setPrintStatus()
          set the print status before printing.
 void setPriority(int pri)
          Sets the engine priority
 void setReportHome(java.lang.String reportHome)
          Sets the report home path where the report.ini and other JReport system files exist.
 void setReportName(java.lang.String reportName)
          Sets the name of report.
 void setResultFile(java.lang.String resultFile)
          Specifies the name of the result file which will be generated by JReport Engine Bean.
 void setResultSet(java.lang.String url)
          Sets the cach query result set of the report which the engine will run.
 void setShowInfoLevel(int level)
          Enables/disables output error and debug message.
 void setSID(java.lang.String sid)
          Sets security identifier of page level security.
 void setSingleThread(boolean single)
          Sets the report engine to use single thread or not.
 void setStyleGroup(java.lang.String styleGroupName)
          Set style group.
 void setTemplatePath(java.lang.String sTemplatePath)
          Sets the template path.
 void setTempPath(java.lang.String sTempPath)
          Sets the temporary path.
 void setThrowException(boolean isThrowException)
          set whether throw exception while program throw exception.
 void setTimeZone(java.lang.String timeZone)
          Sets current time zone by a string.
 void setTimeZone(java.util.TimeZone curTimeZone)
          Sets current time zone.
 void setUserName(java.lang.String name)
          Set user name
 void setUserResultSet(java.sql.ResultSet userResultSet)
          Set the resultset required to run the report.
 void setWherePortion(java.lang.String where)
          Sets the where portion in the SQl query.
 void stopReport()
          Stop running the report.
 void waitForEngineFinish()
          waiting until the engine process success.
 boolean xmlHasNextPage()
          judge whether have next page when export to xml object
 

Method Detail

getID

int getID()
Gets id of engine, the id is an unique identification of engine

Returns:
id of the engine

setConvertEncoding

void setConvertEncoding(int fromEncoding,
                        int toEncoding)
Sets the original encoding and the destination encoding when having encoding converting

Parameters:
fromEncoding - the original encoding
toEncoding - the destination encoding

getConvertFromEncoding

int getConvertFromEncoding()
Gets the original encoding


getConvertToEncoding

int getConvertToEncoding()
Gets the destination encoding


setPriority

void setPriority(int pri)
Sets the engine priority

Parameters:
pri - the engine priority

setSingleThread

void setSingleThread(boolean single)
Sets the report engine to use single thread or not.

Parameters:
single - true use single-thread. Otherwise use multi-thread.

getSingleThread

boolean getSingleThread()
Checks current engine is whether single-thread.

Returns:
true is single-thread. Otherwise is multi-thread.

setStyleGroup

void setStyleGroup(java.lang.String styleGroupName)
Set style group.


setLocale

void setLocale(java.util.Locale currentLocale)
Sets current locale.


setLocale

void setLocale(java.lang.String language,
               java.lang.String country)
Sets current Locale by string language and country.


setEncoding

void setEncoding(java.lang.String encoding)
Sets current encoding.


getAvailableLocales

java.util.Vector getAvailableLocales(java.lang.String clt)
Gets all of the Locales that current report supported. The parameter clt is current client's Locale. If clt is in current report Locales it is moved to at index zero.


setTimeZone

void setTimeZone(java.util.TimeZone curTimeZone)
Sets current time zone.


setTimeZone

void setTimeZone(java.lang.String timeZone)
Sets current time zone by a string.


setClientName

void setClientName(java.lang.String name)
Sets the client name. If engine is used by server the client name is client machine name of request.


getClientName

java.lang.String getClientName()
Gets the client name.


setTempPath

void setTempPath(java.lang.String sTempPath)
Sets the temporary path.

Parameters:
sTempPath - the temporary path(absolute path).

getTempPath

java.lang.String getTempPath()
Gets the temporary path.


setTemplatePath

void setTemplatePath(java.lang.String sTemplatePath)
Sets the template path.

Parameters:
sTemplatePath - the template path(absolute path).

getTemplatePath

java.lang.String getTemplatePath()
Gets the template path.


setHelpPath

void setHelpPath(java.lang.String sHelpPath)
Sets the help path.

Parameters:
sHelpPath - the help path(absolute path).

getHelpPath

java.lang.String getHelpPath()
Gets the help path.


getReportName

java.lang.String getReportName()
Gets the name of report.


getReportHome

java.lang.String getReportHome()
Gets the report home path where the report.ini and other JReport system files exist.

Returns:
the report home path where the report.ini and other JReport system files exist.

setReportHome

void setReportHome(java.lang.String reportHome)
Sets the report home path where the report.ini and other JReport system files exist.

Parameters:
reportHome - the home path where the report.ini and other JReport system files exist.

setReportName

void setReportName(java.lang.String reportName)
Sets the name of report.

Parameters:
reportName - the name of the report which will be run.

setCatName

void setCatName(java.lang.String catName)
Sets the name of the catalog.

Parameters:
catName - the name of the catalog.

getCatName

java.lang.String getCatName()
Gets the name of the catalog.

Returns:
the name of the catalog.

setSID

void setSID(java.lang.String sid)
Sets security identifier of page level security.

Parameters:
sid - the security identifier.

setPageNumbers

void setPageNumbers(int[] pageNums)
Sets the page numbers of page level security.

Parameters:
pageNums - a int array of the page numbers.

getPageNumbers

int[] getPageNumbers()
Gets the page numbers of page level security.

Returns:
the int array of the page numbers.

getSID

java.lang.String getSID()
Gets security identifier of page level security.

Returns:
the security identifier.

hasPageSecurity

boolean hasPageSecurity()
Checks the current report security.

Returns:
true has security. Otherwise return false.

getPageOrientation

int getPageOrientation()
Gets the page orientation.


getParamValues

java.lang.String getParamValues()
Gets the parameter values of the report.

Returns:
paramValues the string containing the parameter values and separated by commas (',').

setParamValues

void setParamValues(java.lang.String paramValues)
Sets the parameter values of the report.

Parameters:
paramValues - the string containing the parameter values and separated by commas (',').

getParamFile

java.lang.String getParamFile()
Sets the name of the parameter values file.

Returns:
paramFile the name of the parameter value file. This will be ignored if paramValues is specified.

setParamFile

void setParamFile(java.lang.String paramFile)
Sets the name of the parameter values file.

Every parameter name to value pair occupies one line in the file (except that if a line ends with \, see bellow.) The name and value is separated by an equals sign '=' (if it exists), and the name is always on the left side and value on the right side.

More rules:

1. All whitespace characters around the name will be ignored, but whitespace characters around value will not be skipped.

2. This rule only applys to those lines whose line break occurs within value string. If a line ends with \, then the following line, if it exists, is treated as a continuation line. So that the value string of the current line (without the last '\'), a new line character ('\n') and the string of next line will be concatenated together. But if a line ends with "\\", "\\" will be treated as the termination character of value string and a single '\' will be appended to the value.

3. This rule only applys to name expression. If an equal sign follows "\\", this string will be treated as a part of parameter name instead of a separator character. For example, "a\\=b=c+d" will be treated as: name is "a=b", value is "c+d".

Parameters:
paramFile - the name of the parameter values file. This will be ignored if the paramValues is specified.

getResultFile

java.lang.String getResultFile()
Gets the name of the result file which will be generated by JReport Engine Bean.

Returns:
the name of the result file.

setResultFile

void setResultFile(java.lang.String resultFile)
Specifies the name of the result file which will be generated by JReport Engine Bean.

Parameters:
resultFile - the name of the result file.

setResultSet

void setResultSet(java.lang.String url)
Sets the cach query result set of the report which the engine will run.

Parameters:
url - the cach query result set of the report which the engine will run.

getResultSet

java.lang.String getResultSet(java.lang.String url)
Gets the cach query result set of the report which the engine will run.


setDataDriver

void setDataDriver(java.lang.String url)
Sets the data driver of the report dataset which the engine will use.

Parameters:
url - The data driver of the report dataset. This will set a runtime data driver for engine. The url is defined as: URL := scheme schemeDelimiter className [";" parameters] Scheme := "jrquery" | "catalogQuery" schemeDelimiter := ":/" className := string specify the class name parameters := parameter | parameter ";" parameters For example: jrquery:/jet.universe.resultfile.UResultFileResultSet;D:\CachedQuery or jrquery:/AddressListDataSource;c:\AddressList.txt. If url is started with schema "CatalogQuery", the data driver of the dataset will be ignored.

getDataDriver

java.lang.String getDataDriver()
Gets the data driver of the report which the engine will run.


getLoadReport

java.lang.String getLoadReport()
Gets the load report flag. The flag descript whether the report has be run. If the flag is "no"(case insensitive), the report will not run.

Returns:
String of load report flag

setLoadReport

void setLoadReport(java.lang.String loadReport)
Enables/disables to run the report.

Parameters:
loadReport - a String, if it equals "yes"(case insensitive) then the report will be run.

setThrowException

void setThrowException(boolean isThrowException)
set whether throw exception while program throw exception.

Parameters:
isThrowException - if throw exception

getThrowException

boolean getThrowException()
return true if the engine throws exception while program throws exception.

Returns:
if throw exception

getThrowable

java.lang.Throwable getThrowable()
Gets the throwable error information.


loadReport

boolean loadReport()
                   throws java.lang.Exception
load report

Throws:
java.lang.Exception

runReport

void runReport(boolean genRst)
parameter genRst decide to output rst file or not, during runReport.


runReport

void runReport()
Launches to run JReport Engine Bean.


runReport

void runReport(java.util.Vector vReportName)
               throws java.lang.Exception
run specified reports in the report set.

Parameters:
vReportName - indicates which reports in the report set will be run.
Throws:
java.lang.Exception

getReportCommunicator

Communicator getReportCommunicator()
Gets Communicator object of report


waitForEngineFinish

void waitForEngineFinish()
waiting until the engine process success. It is only used for multi-thread mode.


save

boolean save(java.lang.String resultFileName)
             throws java.lang.Exception
save current report to result file.

Parameters:
resultFileName - is result file name contains full path
Returns:
true if save sucessed.
Throws:
java.lang.Exception

getTotalPageNumber

int getTotalPageNumber()
Gets the total page number of the report.

Returns:
the total page number of the report, if fail, return -1.

printReport

void printReport(java.lang.Object printJob,
                 java.lang.Object pageFormat,
                 boolean bInteractive,
                 boolean bInBackground,
                 boolean bUseJDK11,
                 boolean bSeparateLargePage,
                 java.lang.String jobName,
                 java.lang.String printer)
Prints the report with the special parameters.

Parameters:
printJob - the print job of this print action.
pageFormat - the page format of this print action.
bInteractive - a boolean value, if you set it to false, the print setup dialog will not show up.
bInBackground - a boolean value, if you set it to false, the printing dialog will not show up.
bUseJDK11 - a boolean value, if you set it to true, it will use JDK1.1.x to print the report. Otherwise if you set it to false, it will use the JDK which you are running to print the report. The JDK 1.1 printing method is quick in speed but the printing quality is not guaranteed. However, The JDK 1.2 method can return you with satisfactory result, even for a gif file, but it is slow in speed. For example, if bUseJDK11 is set false, you can call the printReport method like this: PrinterJob printJob = PrinterJob.getPrinterJob(); bean.printReport(printJob, printJob.defaultPage(), false, false, false);
bSeparateLargePage - a boolean value, if the report page size is larger than the print paper size, and you want to separate the large report page during printing, you should set this property to true. if the print page size which you choose is less than the report page size, then the report will be printed as multiple pages serially, this means we will seperate the large page of the report automatically. After you set it to true, for JDK1.2 or higher, the page format dialog will be popped up. In this dialog, you can choose the page format which you want to print with, we will use this page size for printing. For JDK1.1.x, however, you must change the page format which you want to print with in the print dialog(click the property button, then choose the page format). Note: This printing mothod is not recommended, it may cause some unexpected errors, for example, you may get an extra blank page.

getPrintStatus

java.lang.String getPrintStatus()
Get print status after printing. Excepts "Busy" status, print status will changed to "No report load" after get one time includes: "No print job", "Printing", "Busy", "No report load", "OK", "Error!".


setPrintStatus

void setPrintStatus()
set the print status before printing. it is used in printing background.


ExportToPageable

java.awt.print.Pageable ExportToPageable()
export to Pageable object.

Returns:
Pageable object.

exit

void exit()
When you want to quit from JReport Engine Bean, you should call this method. This method will do some cleaning up work such as delete the temporary files. It is important, so do not to forget to call this method!


getCommunicator

Communicator getCommunicator(java.lang.String filename,
                             int[] pageNums)
                             throws java.io.IOException
Gets Communicator object

Parameters:
filename - the file name
pageNums - an int array of the page numbers.
Throws:
java.io.IOException

getCommunicator

Communicator getCommunicator()
Gets Communicator object


getCommunicator

Communicator getCommunicator(boolean security)
Gets Communicator object

Parameters:
security - indicates that if it needs security.

stopReport

void stopReport()
Stop running the report.


setShowInfoLevel

void setShowInfoLevel(int level)
Enables/disables output error and debug message.

Parameters:
level - the debug level, for example: vDebug | vError

closeLog

void closeLog()
close the log stream.

when all the engine have finised can call the method.


setLogFile

boolean setLogFile(java.lang.String fileName)
Sets the log 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

getStatus

java.lang.String getStatus()
Gets the status after an action.


getReason

java.lang.String getReason()
Get the error reason after occur error.


hasParameter

boolean hasParameter()
check whether current report have parameters.

Returns:
true if current report have parameters, otherwise return false.

getStyleGroupNames

java.util.Vector getStyleGroupNames()
Get all style group names in template


getReportParams

java.util.Vector getReportParams(java.lang.String userName,
                                 java.lang.String paramName,
                                 java.lang.String paramValue,
                                 boolean isAll)
                                 throws java.lang.Exception
Gets parameters related to the parameter specified by param and value. If parameter value changed, this method can be called to return related parameter. or get the parameter value 's related parameter.only one level

Parameters:
userName - the user name
paramName, - if it is null, then return all parameters used by the current report in a proper order and each of them are not other parameter's value.
paramValue, - the new value. Which may lead the new paramters' vector returned back, or the parameter with new drop down list value
isAll - if return all parameter collection. Returns a Vector, each element of this Vector is jet.formula.ParamDesc
Throws:
java.lang.Exception

getReportParams

java.util.Vector getReportParams(java.lang.String userName,
                                 boolean bFirstLevel)
                                 throws java.lang.Exception
Gets all parameters in this report.

Parameters:
userName - the user name
bFirstLevel - if returns only first level parameters Returns a Vector, each element of this Vector is jet.formula.ParamDesc
Throws:
java.lang.Exception

getReportParams

java.util.Vector getReportParams(java.lang.String userName)
                                 throws java.lang.Exception
Gets all parameters in this report.

Parameters:
userName - the user name Returns a Vector, each element of this Vector is jet.formula.ParamDesc
Throws:
java.lang.Exception

getParamDescs

java.util.Hashtable getParamDescs()
Get all objects of ParamDesc the report.

Returns:
a Hashtable contains all objects.

getParamToSubRpt

java.util.Hashtable getParamToSubRpt()
Get the parameter name to the subreport name relationship.

Returns:
a Hashtable indicates the parameter name to the subreport name relationship

exportToRst

boolean exportToRst(java.lang.String loadRstFileName,
                    java.lang.String rstFileName)
load a .rst file and save to another .rst file. Return true if exported successfully.

Parameters:
loadRstFileName - source rst file name contains full path
rstFileName - rst file name contains full path want to saved.
Returns:
if exported successfully

exportToRst

boolean exportToRst(java.lang.String rstFileName)
save current report to a .rst file. Return true if exported successfully.

Parameters:
rstFileName - rst file name contains full path want to saved.
Returns:
if exported successfully

exportToRst

boolean exportToRst(java.util.Map reportInfo,
                    java.lang.String rstFileName,
                    boolean isZip)
save reports and views to a .rst file. Return true if export sucessed.

Parameters:
rstFileName - rst file name contains full path want to saved.
Returns:
true if succeed

exportToHtml

boolean exportToHtml(java.lang.String rstFileName,
                     java.lang.String htmlFileName,
                     boolean bChartApplet,
                     boolean isMultiFile,
                     boolean bUsingTable,
                     boolean bHyperlink,
                     boolean bPageNum,
                     boolean bAbsolute,
                     int iBrowser,
                     boolean bincdrilldownfile,
                     boolean noMargin,
                     java.lang.String title,
                     int resolution,
                     int overflowType)
Exports result report file(with the .rst extension)to a HTML file.

Parameters:
rstFileName - the result file name.
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet (false).
isMultiFile - indicates whether to export the html to a file or to multiple files (true).
bUsingTable - indicates whether to use html table format when exporting html files (false)
bHyperlink - indicates whether to generate a hyperlink (true)
bPageNum - indicates whether to generate page numbers (true)
bAbsolute - indicates the font size is absolute or relative (true)
iBrowser - indicates the browser is IE or NETSCAPE. The value of parameter int browser must be one of the IE or NETSCAPE (ReportEngineConst.IE).
bincdrilldownfile - indicates to generate the drilldown html files in the file list (false).
noMargin - indicates to generate the html files without page Margin (false).
title - the title of the exported html file (null).
resolution - indicates resolution of the html files (-1).
overflowType - Indicates the html text overflow type (ReportEngineConst.HIDDEN)
Returns:
true if exported successfully.

exportToHtml

boolean exportToHtml(java.lang.String rstFileName,
                     java.lang.String htmlFileName,
                     boolean bChartApplet,
                     boolean isMultiFile,
                     boolean bUsingTable,
                     boolean bHyperlink,
                     boolean bPageNum,
                     boolean bAbsolute,
                     int iBrowser,
                     boolean bincdrilldownfile,
                     boolean noMargin,
                     java.lang.String title,
                     int resolution,
                     int overflowType,
                     int chartFormat)
Exports result report file(with the .rst extension)to a HTML file.

Parameters:
rstFileName - the result file name.
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet (false).
isMultiFile - indicates whether to export the html to a file or to multiple files (true).
bUsingTable - indicates whether to use html table format when exporting html files (false)
bHyperlink - indicates whether to generate a hyperlink (true)
bPageNum - indicates whether to generate page numbers (true)
bAbsolute - indicates the font size is absolute or relative (true)
iBrowser - indicates the browser is IE or NETSCAPE. The value of parameter int browser must be one of the IE or NETSCAPE (ReportEngineConst.IE).
bincdrilldownfile - indicates to generate the drilldown html files in the file list (false).
noMargin - indicates to generate the html files without page Margin (false).
title - the title of the exported html file (null).
resolution - indicates resolution of the html files (-1).
overflowType - Indicates the html text overflow type (ReportEngineConst.HIDDEN)
chartFormat - Indicates the html image chart format type.
Returns:
true if exported successfully.

exportToHtml

boolean exportToHtml(java.lang.String htmlFileName,
                     boolean bChartApplet,
                     boolean isMultiFile,
                     boolean bUsingTable,
                     boolean bHyperlink,
                     boolean bPageNum,
                     boolean bAbsolute,
                     int iBrowser,
                     boolean bincdrilldownfile,
                     boolean noMargin,
                     java.lang.String title,
                     int resolution,
                     int overflowType)
Exports the current report to HTML.

Parameters:
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet (false).
isMultiFile - indicates whether to export the html to a file or to multiple files (true).
bUsingTable - indicates whether to use html table format when exporting html files (false)
bHyperlink - indicates whether to generate a hyperlink (true)
bPageNum - indicates whether to generate page numbers (true)
bAbsolute - indicates the font size is absolute or relative (true)
iBrowser - indicates the browser is IE or NETSCAPE. The value of
bincdrilldownfile - indicates the drilldown html files were included in file list (false)
noMargin - indicates to generate the html files without page margin (false).
title - the title of the exported html file (null).
resolution - indicates resolution of the html files (-1).
overflowType - Indicates the html text overflow type (ReportEngineConst.HIDDEN)
Returns:
true if exported successfully.

exportToHtml

boolean exportToHtml(java.lang.String htmlFileName,
                     boolean bChartApplet,
                     boolean isMultiFile,
                     boolean bUsingTable,
                     boolean bHyperlink,
                     boolean bPageNum,
                     boolean bAbsolute,
                     int iBrowser,
                     boolean bincdrilldownfile,
                     boolean noMargin,
                     java.lang.String title,
                     int resolution,
                     int overflowType,
                     int chartFormat)
Exports the current report to HTML.

Parameters:
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet (false).
isMultiFile - indicates whether to export the html to a file or to multiple files (true).
bUsingTable - indicates whether to use html table format when exporting html files (false)
bHyperlink - indicates whether to generate a hyperlink (true)
bPageNum - indicates whether to generate page numbers (true)
bAbsolute - indicates the font size is absolute or relative (true)
iBrowser - indicates the browser is IE or NETSCAPE. The value of
bincdrilldownfile - indicates the drilldown html files were included in file list (false)
noMargin - indicates to generate the html files without page margin (false).
title - the title of the exported html file (null).
resolution - indicates resolution of the html files (-1).
overflowType - Indicates the html text overflow type (ReportEngineConst.HIDDEN)
chartFormat - Indicates the html image chart format type.
Returns:
true if exported successfully.

exportToHtml

boolean exportToHtml(ExportInfo info,
                     HtmlParameter param)
Exports the report to HTML file.

Parameters:
info - The report information for export.
param - The HTML file information.
Returns:
true if exported successfully.

getAllHtmlFile

java.util.Vector getAllHtmlFile()
Returns all html files that are generated by exportToHtml.


getAllPdfFile

java.util.Vector getAllPdfFile()
Returns all pdf files that are generated by exportToPdf.


exportToDhtml

boolean exportToDhtml(java.lang.String rstFileName,
                      java.lang.String htmlFileName,
                      boolean bChartApplet,
                      boolean isMultiFile,
                      boolean bUsingTable,
                      boolean bHyperlink,
                      boolean bPageNum,
                      boolean bAbsolute,
                      int iBrowser,
                      boolean bincdrilldownfile,
                      boolean noMargin,
                      java.lang.String title,
                      int resolution,
                      int overflowType)
Exports result report file(with the .rst extension)to a HTML file.

Parameters:
rstFileName - the result file name.
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet (false).
isMultiFile - indicates whether to export the html to a file or to multiple files (true).
bUsingTable - indicates whether to use html table format when exporting html files (false)
bHyperlink - indicates whether to generate a hyperlink (true)
bPageNum - indicates whether to generate page numbers (true)
bAbsolute - indicates the font size is absolute or relative (true)
iBrowser - indicates the browser is IE or NETSCAPE. The value of parameter int browser must be one of the IE or NETSCAPE. (ReportEngineConst.IE)
bincdrilldownfile - indicates to generate the drilldown html files in the file list (false).
noMargin - indicates to generate the html files without page Margin (false).
title - the title of the exported html file (null).
resolution - indicates resolution of the html files (-1).
overflowType - Indicates the html text overflow type (ReportEngineConst.HIDDEN)
Returns:
true if exported successfully.

exportToDhtml

boolean exportToDhtml(java.lang.String htmlFileName,
                      boolean bChartApplet,
                      boolean isMultiFile,
                      boolean bUsingTable,
                      boolean bHyperlink,
                      boolean bPageNum,
                      boolean bAbsolute,
                      int iBrowser,
                      boolean bincdrilldownfile,
                      boolean noMargin,
                      java.lang.String title,
                      int resolution,
                      int overflowType)
Exports the current report to HTML.

Parameters:
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet (false).
isMultiFile - indicates whether to export the html to a file or to multiple files (true).
bUsingTable - indicates whether to use html table format when exporting html files (false)
bHyperlink - indicates whether to generate a hyperlink (true)
bPageNum - indicates whether to generate page numbers (true)
bAbsolute - indicates the font size is absolute or relative (true)
iBrowser - indicates the browser is IE or NETSCAPE. The value of
bincdrilldownfile - indicates the drilldown html files were included in file list (false)
noMargin - indicates to generate the html files without page margin (false).
title - the title of the exported html file (null).
resolution - indicates resolution of the html files (-1).
overflowType - Indicates the html text overflow type (ReportEngineConst.HIDDEN)
Returns:
true if exported successfully.

exportToPdf

boolean exportToPdf(java.lang.String pdfFileName,
                    boolean noMargin,
                    boolean isSimPrintMode,
                    int isCompressImage,
                    boolean isTransparent,
                    boolean bToc,
                    boolean bDrill,
                    java.lang.String password)
Exports the current report to a PDF file.

Parameters:
pdfFileName - the PDF file name.
noMargin - indicates to generate the pdf file without page margin (false).
isSimPrintMode - indicates to generate the pdf file use simulated printing mode (false).
isCompressImage - indicatess to generate the pdf file compress image (20).
isTransparent - - indicates to generate the pdf file keep transparent gif image(false)
bToc - indicates to generate the pdf file with TOC (false)
bDrill - indicates to generate the pdf file with Drill Down (false)
password - indicates to generate the pdf file with encryption, if dont encrypt, password == null. (null)
Returns:
true if exported successfully.

exportToPdf

boolean exportToPdf(java.lang.String rstFileName,
                    java.lang.String pdfFileName,
                    boolean noMargin,
                    boolean isSimPrintMode,
                    int isCompressImage,
                    boolean isTransparent,
                    boolean bToc,
                    boolean bDrill,
                    java.lang.String password)
Exports the current report to a PDF file.

Parameters:
rstFileName - the result file name.
pdfFileName - the PDF file name.
noMargin - indicates to generate the pdf file without page margin (false).
isSimPrintMode - indicates to generate the pdf file use simulated printing mode (false).
isCompressImage - indicatess to generate the pdf file compress image (20).
isTransparent - - indicates to generate the pdf file keep transparent gif image(false)
bToc - indicates to generate the pdf file with TOC (false)
bDrill - indicates to generate the pdf file with Drill Down (false)
password - indicates to generate the pdf file with encryption, if dont encrypt, password == null. (null)
Returns:
true if exported successfully.

exportToPDF

boolean exportToPDF(ExportInfo info,
                    PDFParameter param)
Exports the report to PDF file.

Parameters:
info - The report information for export.
param - The PDF file information.
Returns:
true if exported successfully.

exportToText

boolean exportToText(java.lang.String rstFileName,
                     java.lang.String textFileName,
                     boolean isNormalText,
                     boolean isRepeat,
                     char delimiter,
                     int udchWidth,
                     int udchHeight,
                     boolean compress,
                     int resolution,
                     boolean quoteMark,
                     boolean hasHeadFoot,
                     boolean forWindows)
Exports result report file(with the .rst extension)to a TEXT file.

Parameters:
rstFileName - the result file name.
textFileName - the TEXT file name.
isNormalText - sets whether this text file is in the normal text format or 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 application (false)

isRepeat - indicates whether to repeat the same contents (false).
delimiter - the delimiter used in the SDF(Standard Data Format) format (' ').
udchWidth - the width for each unit of the width clearance between columns (-1).
udchHeight - the height for each unit of the height clearance between columns (-1).
compress - remove empty lines or redundant delimiters in the exported text file (false).
resolution - define the resolution by which the character be converted (-1)
quoteMark - keep the quote character in standard format text (true)
hasHeadFoot - the text has haeder and footer (true)
forWindows - to indicate the platform on which the text file will be accessed (true).
Returns:
true if exported successfully.

exportToText

boolean exportToText(java.lang.String textFileName,
                     boolean isNormalText,
                     boolean isRepeat,
                     char delimiter,
                     int udchWidth,
                     int udchHeight,
                     boolean compress,
                     int resolution,
                     boolean quoteMark,
                     boolean hasHeadFoot,
                     boolean forWindows)
Exports current report to a TEXT file.

Parameters:
textFileName - the TEXT file name.
isNormalText - is to set whether this text file is normal text format or 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 application (false)

isRepeat - indicates whether to repeat the same contents (false).
delimiter - delimiter used in SDF(Standard Data Format) format (' ')
udchWidth - the width for each unit of the width clearance between columns (-1).
udchHeight - the height for each unit of the height clearance between columns (-1).
compress - remove empty lines or redundant delimiters in the exported text file (false).
resolution - define the resolution by which the character be converted (-1)
quoteMark - keep the quote character in standard format text (true)
hasHeadFoot - the text has haeder and footer (true)
forWindows - to indicate the platform on which the text file will be accessed (true).
Returns:
true if exported successfully.

exportToText

boolean exportToText(ExportInfo info,
                     TextParameter param)
Exports the report to text file.

Parameters:
info - The report information for export.
param - The text file information.
Returns:
true if exported successfully.

exportToPS

boolean exportToPS(java.lang.String rstFileName,
                   java.lang.String psFileName,
                   boolean noMargin)
Exports report result file(with the .rst extension)to a PS(PostScript) file.

Parameters:
rstFileName - the result file name.
psFileName - the PS file name.
noMargin - ,indicate to export to PS file without page margin (false).
Returns:
true if exported successfully.

exportToPS

boolean exportToPS(java.lang.String psFileName,
                   boolean noMargin)
Exports the current report to a PS(PostScript) file.

Parameters:
psFileName - the PS file name.
noMargin - ,indicate to export to PS file without page margin (false).
Returns:
true if exported successfully.

exportToPS

boolean exportToPS(ExportInfo info,
                   PSParameter param)
Exports the report to postscript file.

Parameters:
info - The report information for export.
param - The postscript file information.
Returns:
true if exported successfully.

exportToRtf

boolean exportToRtf(java.lang.String rtfFileName,
                    boolean noMargin)
Exports the current report to RTF(Rich Text Format). The result of RTF is saved in a .rtf file. This file can be opened by Microsoft Word.

Parameters:
rtfFileName - the Rtf file name.
noMargin - ,indicate to export to Rtf file without page margin (false).
Returns:
true if exported successfully.

exportToRtf

boolean exportToRtf(java.lang.String rstFileName,
                    java.lang.String rtfFileName,
                    boolean noMargin)
Exports report result file(with the .rst extension)to RTF(Rich Text Format). The result of RTF is saved in a .rtf file. This file can be opened by Microsoft Word.

Parameters:
rstFileName - the result file name.
rtfFileName - the Rtf file name.
noMargin - ,indicate to export to Rtf file without page margin (false).
Returns:
true if exported successfully.

exportToRtf

boolean exportToRtf(ExportInfo info,
                    RtfParameter param)
Exports the report to RTF file.

Parameters:
info - The report information for export.
param - The RTF file information.
Returns:
true if exported successfully.

getAllRtfFile

java.util.Vector getAllRtfFile()
return the output file of export to rtf


exportToXML

boolean exportToXML(java.lang.String xmlFileName,
                    boolean isOnlyData,
                    java.lang.String existXSFile)
                    throws java.lang.ClassNotFoundException
Exports the current report to XML. The result of xml is saved in a .xml file.

Parameters:
xmlFileName - the XML file name.
isOnlyData - , indicates that only database column information is exported to the XML file, otherwise all report details, including all the properties will be exported (false).
existXSFile - , specify the schema file which is based when export to XML file, if set to null, create the schema file
Returns:
true if exported successfully.
Throws:
java.lang.ClassNotFoundException

exportToXML

boolean exportToXML(java.lang.String rstFileName,
                    java.lang.String xmlFileName,
                    boolean isOnlyData,
                    java.lang.String existedSchemaFile)
                    throws java.lang.ClassNotFoundException
Exports the specified report result to XML. The result of xml is saved in a .xml file.

Parameters:
rstFileName - the result file name.
xmlFileName - the XML file name.
isOnlyData - , indicates that only database column information is exported to the XML file, otherwise all report details, including all the properties will be exported (false).
existedSchemaFile - , specify the schema file which is based when export to XML file, if set to null, create the schema file
Returns:
true if exported successfully.
Throws:
java.lang.ClassNotFoundException

exportToXML

boolean exportToXML(ExportInfo info,
                    XmlParameter param)
                    throws java.lang.ClassNotFoundException
Exports the report to xml file.

Parameters:
info - The report information for export.
param - The xml file information.
Returns:
true if exported successfully.
Throws:
java.lang.ClassNotFoundException

getAllXMLFile

java.util.Vector getAllXMLFile()
return the output file of export to xml


exportToXMLObject

boolean exportToXMLObject(java.lang.String rstFileName,
                          boolean isOnlyData,
                          java.lang.String existedSchemaFile)
Initialize exporting the specified report result to XML Element.

Parameters:
rstFileName - the result file name.
isOnlyData - , indicates that only database column information is exported to the XML file, otherwise all report details, including all the properties will be exported.
existedSchemaFile - , specify the schema file which is based when export to XML file, if set to null, create the schema file
Returns:
true if initalize successfully.

exportToXMLObject

boolean exportToXMLObject(boolean isOnlyData,
                          java.lang.String existedSchemaFile)
Initialize exporting the current report to XML Element.

Parameters:
isOnlyData - , indicates that only database column information is exported to the XML file, otherwise all report details, including all the properties will be exported.
existedSchemaFile - , specify the schema file which is based when export to XML file, if set to null, create the schema file
Returns:
true if initalize successfully.

xmlHasNextPage

boolean xmlHasNextPage()
judge whether have next page when export to xml object


publishXMLNextPage

org.w3c.dom.Element publishXMLNextPage()
return next xml object when export to xml object.


exportToXls

boolean exportToXls(java.lang.String rstFileName,
                    java.lang.String xlsFileName,
                    int isWordWrap,
                    boolean isBiff8,
                    int param,
                    boolean shareLabel)
Exports report result file(with the .rst extension)to BIFF(Binary File Format). The result of BIFF is saved in a .xls file. This file can be opened by Microsoft Excel.

Parameters:
rstFileName - the result file name.
xlsFileName - the Xls file name.
isWordWrap - indicates whether wordwrap the field, the value must to be KEEPORIGIN, NOWORDWRAP or WORDWRAPALL (ReportEngineConst.KEEPORIGIN)
isBiff8 - indicates whether in Excel2000 format (false)
param - indicates if export shapes (ReportEngineConst.NOEXPORTSHAPE)
shareLabel - whether share label no matter whether it repeat (false)
Returns:
true if exported successfully.

exportToXls

boolean exportToXls(java.lang.String xlsFileName,
                    int isWordWrap,
                    boolean isBiff8,
                    int param,
                    boolean shareLabel)
Exports report to BIFF(Binary File Format). The result of BIFF is saved in a .xls file. This file can be opened by Microsoft Excel.

Parameters:
xlsFileName - the Xls file name.
isWordWrap - indicates whether wordwrap the field, the value must to be KEEPORIGIN, NOWORDWRAP or WORDWRAPALL (ReportEngineConst.KEEPORIGIN)
isBiff8 - indicates whether in Excel2000 format (false)
param - indicates if export shapes (ReportEngineConst.NOEXPORTSHAPE)
shareLabel - whether share label no matter whether it repeat (false)
Returns:
true if exported successfully.

exportToXls

boolean exportToXls(ExportInfo info,
                    ExcelParameter param)
Exports the report to Excel file.

Parameters:
info - The report information for export.
param - The Excel file information.
Returns:
true if exported successfully.

getAllXlsFile

java.util.Vector getAllXlsFile()
return the output file of export to xls


configMailServer

void configMailServer(java.lang.String SMTPServerIP,
                      java.lang.String MyMailAddress,
                      int SMTPServerPort)
Configures the mail server.

Parameters:
SMTPServerIP - the mail server IP address
MyMailAddress - sender's mail address
SMTPServerPort - the mail server port

exportToMail

void exportToMail(java.lang.String from,
                  java.lang.String rcpt,
                  java.lang.String cc,
                  java.lang.String bcc,
                  java.lang.String subject,
                  java.lang.String comments,
                  boolean compress,
                  int rptformat,
                  boolean noMargin,
                  int udwidth,
                  int udheight,
                  boolean isSimPrintMode,
                  int isCompressImage,
                  boolean isDataOnlyXML,
                  java.lang.String xsdFile,
                  boolean hasHeadFoot,
                  boolean isGifTrans,
                  boolean bTxtCompress,
                  boolean isTable,
                  int isWordWrap,
                  boolean isBiff8,
                  int param,
                  boolean bToc,
                  boolean bDrill,
                  java.lang.String encoding)
                  throws java.lang.Exception
Exports the current report to mail.

Parameters:
from - the address of the sender
rcpt - the address of the receipt
cc - copy to address
bcc - blind copy to address
subject - the mail subject
comments - any text string for memoire
compress - indicates whether use java compress utilities to compress mail contents
rptformat - available choice are : rst file mail, html mail, html files mail, pdf file mail, plain text mail and SDF format text mail
noMargin - indicate that export file without page Margin (false)
udwidth - and udheight are user defined char width and height used in plain text format (-1)
isSimPrintMode - indicates to generate the pdf file use simulated print mode (false).
isCompressImage - indicates to generate the pdf file compress image (20).
isDataOnlyXML - indicates that the xml file has data only (false)
xsdFile - the .xsd file path
hasHeadFoot - indicates that if the text file has header and footer (true)
isGifTrans - indicates that if the image is trnasparent (false)
bTxtCompress - indicates that if the text is compressed (false)
isTable - indicates that if the html has table (false)
isWordWrap - indicates whether wordwrap the field, the value must to be KEEPORIGIN, NOWORDWRAP or WORDWRAPALL (ReportEngineConst.KEEPORIGIN)
isBiff8 - indicates that if the excel has excel2000 format (false)
param - indicates to generate the excel file with geometry object (ReportEngineConst.EXPORTSHAPE)
bToc - indicates to generate the pdf file with TOC (false)
bDrill - indicates to generate the pdf file with Drill Down (false)
encoding - the encoding of the mail subject and comments
Throws:
java.lang.Exception

sendNormalMail

void sendNormalMail(java.lang.String from,
                    java.lang.String rcpt,
                    java.lang.String cc,
                    java.lang.String bcc,
                    java.lang.String subject,
                    java.lang.String comments,
                    boolean compress,
                    java.util.Vector additionfiles)
                    throws java.lang.Exception
Export current report engine that has already run to mail.

Parameters:
rcpt - receipt address
cc - copy to address
bcc - blind copy to address
subject - mail subject
comments - any text string for memoire
compress - indicates whether to use java compress utilities to compress the mail contents
additionfiles - addition file attached to the mail other than report results, if addition file is null, it means no files attached to the mail.
Throws:
java.lang.Exception

setNamedWherePortion

void setNamedWherePortion(java.lang.String name)
Sets the where portion name in the query.


setWherePortion

void setWherePortion(java.lang.String where)
Sets the where portion in the SQl query.


saveWherePortion

boolean saveWherePortion(java.lang.String strName,
                         java.lang.String dataSourceName,
                         java.lang.String strQueryName,
                         java.lang.String strSQL)
Saves the where portion to the specified query and save the catalog.

Parameters:
strName, - the name of the where portion
dataSourceName, - the name of the datasource the where portion is set
strQueryName, - the name of the query the where portion is set
strSQL, - the where portion statement
Returns:
true if the where portion is saved successfully.

saveWherePortion

boolean saveWherePortion(java.lang.String strName,
                         java.lang.String dataSourceName,
                         java.lang.String strQueryName,
                         java.util.Vector vecGroups)
Save the where portion to the specified query and save the catalog.

Parameters:
strName, - the name of where portion.
dataSourceName, - the name of the datasource the where portion is set.
strQueryName, - the name of the query the where portion is set.
vecGroups, - the where portion structure.
Returns:
true if the where portion is saved successfully.

saveWherePortion

boolean saveWherePortion(java.lang.String strName,
                         java.lang.String strSQL)
Saves the specified where portion to the current query and save the catalog.

Parameters:
strName, - the name of the where portion.
strSQL, - the where portion statement.
Returns:
true if the where portion is saved successfully.

saveWherePortion

boolean saveWherePortion(java.lang.String strName,
                         java.util.Vector vecGroups)
Saves the specified where portion to the current query and save the catalog.

Parameters:
strName, - the name of where portion.
vecGroups, - the where portion structure.
Returns:
true if the where portion is saved successfully.

modifyWherePortion

boolean modifyWherePortion(java.lang.String strName,
                           java.lang.String strSQL)
Modifies the specified where portion in the current query and save the catalog.

Parameters:
strName, - the name of where portion.
strSQL, - the where portion statement.
Returns:
true if the where portion is saved successfully.

modifyWherePortion

boolean modifyWherePortion(java.lang.String strName,
                           java.util.Vector vecGroups)
Modifies the specified where portion in the current query and save the catalog.

Parameters:
strName, - the name of where portion.
vecGroups, - the where portion structure.
Returns:
true if the where portion is saved successfully.

deleteWherePortion

boolean deleteWherePortion(java.lang.String strName)
Removes the specified where portion and save the catalog.

Parameters:
strName, - the name of the where portion.
Returns:
true if the where portion is deleted successfully.

deleteWherePortion

boolean deleteWherePortion(java.lang.String strName,
                           java.lang.String sourceName)
Removes the specified where portion and save the catalog.

Parameters:
strName, - the name of the where portion.
Returns:
true if the where portion is deleted successfully.

getAvailableWherePortions

java.util.Enumeration getAvailableWherePortions()
Gets the enumeration of all the where portion names in the catalog.

Returns:
a enumeration of the where portion names.

getAvailableQueryFields

java.util.Enumeration getAvailableQueryFields()
Gets the available fields of the query The available fields include: 1. Query field in the select clause. 2. Available formulas. These formulas do not include summary and group level formulas. 3. All of the parameters. 4. All the table columns in the from clause.

Returns:
a enumeration that contains QueryFieldDesc, null if the query is not found.

getWherePortionsSQL

java.lang.String getWherePortionsSQL(java.lang.String nameOfWherePortion)
Gets the specified where portion.

Parameters:
nameOfWherePortion, - the name of the where portion.
Returns:
the statement of where portion if successfully, else null.

getWherePortionsSQL

java.lang.String getWherePortionsSQL(java.lang.String nameOfWherePortion,
                                     java.lang.String sourceName)
Gets the specified where portion.

Parameters:
nameOfWherePortion, - the name of the where portion.
sourceName, - the name of the data source.
Returns:
the statement of where portion if successfully, else null.

saveCatalog

boolean saveCatalog()
Saves the catalog

Returns:
true if successful.

addFileQuery

boolean addFileQuery(java.lang.String strName,
                     java.io.File flPath)
Add the specified file query to the current catalog.

Parameters:
strName, - the name of the file query.
flPath, - the sql file.
Returns:
true if successful, otherwise false.

addFileQuery

boolean addFileQuery(java.lang.String strName,
                     java.io.File flPath,
                     java.lang.String sourceName)
Add the specified file query to the current catalog.

Parameters:
strName, - the name of the file query.
flPath, - the sql file.
sourceName, - the name of the data source.
Returns:
true if successful, otherwise false.

getSQL

java.lang.String getSQL()
Gets the sql statement of this report.

Returns:
the sql statement.

modifyUserInfo

void modifyUserInfo(java.lang.String strUserName,
                    java.lang.String strPassword,
                    java.lang.String dataSourceName)
Modifies the User and Password information in the specified connection description. Note: A connection contains the tables, views, stored procedures and file queries. The queries, formulas and summaris also depend on the connection. Please be careful when you call this method.


setConnection

void setConnection(java.lang.String strURL,
                   java.lang.String strUID,
                   java.lang.String strPSWD,
                   java.lang.String strJdbcDriver,
                   boolean fetchSupportInfo)
Sets the connection required to run the engine.

Parameters:
strURL, - the URL of the database.
strUID, - the user id for the JDBC driver.
strPSWD, - the password for the JDBC driver.
strJdbcDriver, - the JdbcDriver.
fetchSupportInfo, - Set true to get the user support information. This method will only work when the user has set the connection object or url.

setConnection

void setConnection(java.sql.Connection userDbConnection,
                   boolean fetchSupportInfo)
Set the connection required to run the engine.

Parameters:
userDbConnection, - the JDBC Connection object created by the user. Users should close it by themselves.
fetchSupportInfo, - Set true to get the user support information. This method will only work when the user has set the connection object or url.

setFetchSupportInfo

void setFetchSupportInfo(boolean fetchSupportInfo)
Set true to get the user support information. This method will only work when the user has set the connection object or url.

Parameters:
fetchSupportInfo, - a boolean value.

setUserResultSet

void setUserResultSet(java.sql.ResultSet userResultSet)
Set the resultset required to run the report.

Parameters:
userResultSet, - the JDBC ResultSet object created by the user. Users should release it by themselves.

getDetailsFields

java.util.Vector getDetailsFields()
                                  throws java.lang.Exception
Get all the fields information in the details section including fields in all subreport a field informaiton including field name and type

Throws:
java.lang.Exception

setUserName

void setUserName(java.lang.String name)
Set user name

Parameters:
name - the user name

getRecordLength

int getRecordLength()
                    throws java.lang.Exception
Get the length of record

Throws:
java.lang.Exception

getJoinCondition

java.lang.String getJoinCondition()
Get join portion condition caluse in SQL statement.


getWhereCondition

java.lang.String getWhereCondition()
Get where portion conditions caluse in SQL statement.


getRptDescs

java.util.Hashtable getRptDescs()
                                throws java.lang.Exception
return current universe's report Description, key is report file name(with" .cls"), value is the description.

Throws:
java.lang.Exception

getLocale

java.util.Locale getLocale()
Gets locale


getTimeZone

java.util.TimeZone getTimeZone()
Gets timezone


exportToFax

boolean exportToFax(java.lang.String portStr,
                    java.lang.String initStr,
                    int iDialing,
                    int iFlowControl,
                    java.lang.String flowCommand,
                    int iClass,
                    int txtTimeOut,
                    int txtRetries,
                    boolean q_best,
                    boolean q_normal,
                    boolean q_fast,
                    boolean isAddCover,
                    java.lang.String faxnum,
                    java.lang.String from,
                    java.lang.String to,
                    java.lang.String company,
                    java.lang.String phone,
                    java.lang.String date,
                    java.lang.String re,
                    java.lang.String comments,
                    boolean urgent,
                    boolean review,
                    boolean comment,
                    boolean reply)
                    throws java.lang.Exception
Exports the current report to fax.

Parameters:
portStr - is the port name.Such as COM1..
initStr - is the initialize string of modem.
iDialing - is dialing mode(tone or pulse)
iFlowControl - is flow control mode of modem.
iFlowCommand - is flow command of modem.
iClass - is fax class.
txtTimeOut - is to set how long will fax wait for response of destination.
txtRetries - is to set how many times our application will refax to destination if there is busy.
q_best,q_normal,q_fast - is the quality of fax image.
isAddCover - is whether add cover before fax report.
faxnum - is fax phone.
from - is sender would be shown in cover.
to - is receiver.
company - is comapny name would be shown in cover.
phone - is phone number would be shown in cover
re - is subject.
comments - is text.
urgent,review,comment,reply - is remark of this fax would be shown in cover.
Throws:
java.lang.Exception

exportToFax

boolean exportToFax(ExportInfo info,
                    java.lang.String portStr,
                    java.lang.String initStr,
                    int iDialing,
                    int iFlowControl,
                    java.lang.String flowCommand,
                    int iClass,
                    int txtTimeOut,
                    int txtRetries,
                    boolean q_best,
                    boolean q_normal,
                    boolean q_fast,
                    boolean isAddCover,
                    java.lang.String faxnum,
                    java.lang.String from,
                    java.lang.String to,
                    java.lang.String company,
                    java.lang.String phone,
                    java.lang.String date,
                    java.lang.String re,
                    java.lang.String comments,
                    boolean urgent,
                    boolean review,
                    boolean comment,
                    boolean reply)
                    throws java.lang.Exception
Exports the current report to fax.

Parameters:
portStr - is the port name.Such as COM1..
initStr - is the initialize string of modem.
iDialing - is dialing mode(tone or pulse)
iFlowControl - is flow control mode of modem.
iFlowCommand - is flow command of modem.
iClass - is fax class.
txtTimeOut - is to set how long will fax wait for response of destination.
txtRetries - is to set how many times our application will refax to destination if there is busy.
q_best,q_normal,q_fast - is the quality of fax image.
isAddCover - is whether add cover before fax report.
faxnum - is fax phone.
from - is sender would be shown in cover.
to - is receiver.
company - is comapny name would be shown in cover.
phone - is phone number would be shown in cover
re - is subject.
comments - is text.
urgent,review,comment,reply - is remark of this fax would be shown in cover.
Throws:
java.lang.Exception