|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjet.bean.JRPrepareViewer
public class JRPrepareViewer
This JRPrepareViewer
bean provides methods to prepare a report to run
so the user can select parameters and the application set the catalog and report name
rather than let the user choose it. Allows more functionality such as locale and proxy settings
than JRCltPreViewer.
Field Summary | |
---|---|
static int |
vDebug
Indicates to open the debug log. |
static int |
vError
Indicates to open the error log. |
static int |
vOff
Indicates to close the debug and error logs. |
Constructor Summary | |
---|---|
JRPrepareViewer()
The default constructor. |
Method Summary | |
---|---|
java.lang.String |
getCatName()
Gets the catalog name. |
java.lang.String |
getFullPath()
Gets the full path for JReport Servlet. |
java.lang.String |
getLoadReport()
|
java.util.Locale |
getLocale()
Gets the locale. |
java.lang.String |
getPassword()
Gets the password to log in to JReport Server. |
boolean |
getPopupErrorDialog()
Gets the value about whether to pop up error message dialog. |
boolean |
getPopupParamDialog()
Gets the status about whether to pop up the parameter dialog or not when running a report. |
java.lang.String |
getPort()
Gets the port number of the server. |
java.lang.String |
getProxyHost()
Returns the proxy host name or IP address. |
java.lang.String |
getProxyPassword()
Returns the password to log in to the proxy server if needed. |
java.lang.String |
getProxyPort()
Returns the proxy port number. |
java.lang.String |
getProxyUser()
Returns the user name to log in to the proxy server. |
java.lang.String |
getReportName()
Gets the report name. |
java.util.Vector |
getReportParams()
Gets the parameters of the current report. |
java.util.Vector |
getReports()
Returns all reports under the current catalog directory in JReport Server. |
java.lang.String |
getServerName()
Gets the server name or IP address where the report runs. |
boolean |
getSSL()
Gets current SSL state |
java.lang.String |
getStatus()
Gets the status after an action. |
java.lang.String |
getUserName()
Gets the user name to log in to JReport Server. |
void |
logout()
Enables to log out from JReport Server. |
void |
prepareRun()
Launches to run JReport Viewer Bean. |
void |
readExternal(java.io.ObjectInput in)
|
void |
setCatalogVersion(int verNumber)
Sets the catalog version number. |
void |
setCatName(java.lang.String catName)
Sets the catalog name. |
void |
setConnection(java.lang.String strURL,
java.lang.String strUID,
java.lang.String strPSWD,
java.lang.String strJdbcDriver)
Sets the connection required to run the engine. |
void |
setFullPath(java.lang.String fullPath)
Sets the full path for JReport Servlet. |
void |
setLanguage(java.lang.String rptLanguage)
Sets language and converts to a Locale object. |
void |
setLoadReport(java.lang.String loadReport)
Enables/disables to run the report. |
void |
setLocale(java.util.Locale loc)
Sets the locale. |
boolean |
setLogFile(java.lang.String fileName)
Sets the log file path and name. |
void |
setPassword(java.lang.String password)
Sets the password to log in to JReport Server. |
void |
setPopupErrorDialog(boolean isPopup)
Allows users to set whether to pop up the error message dialog when an Exception occurs. |
void |
setPopupParamDialog(boolean bPopupDialog)
Indicates whether to pop up the parameter dialog when running a report. |
void |
setPort(java.lang.String port)
Sets the port number of the server, usually 8888. |
void |
setProxyHost(java.lang.String proxyHost)
Sets the proxy host name or IP address if needed. |
void |
setProxyPassword(java.lang.String proxyPassword)
Sets the password to log in to the proxy server if needed. |
void |
setProxyPort(java.lang.String proxyPort)
Sets the proxy port number. |
void |
setProxyUser(java.lang.String proxyUserName)
Sets the user name to log in to the proxy server if needed. |
void |
setReportName(java.lang.String reportName)
Sets the report name. |
void |
setReportVersion(int verNumber)
Sets the report version number. |
void |
setServerName(java.lang.String serverName)
Sets the server name or IP address. |
void |
setShowInfoLevel(int level)
Enables/disables output error and debug message. |
void |
setSSL(boolean SSL)
Sets whether to use SSL connection or not |
void |
setUserName(java.lang.String userName)
Sets the user name to log in to JReport Server. |
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int vOff
public static final int vDebug
public static final int vError
Constructor Detail |
---|
public JRPrepareViewer()
Method Detail |
---|
public void setPopupParamDialog(boolean bPopupDialog)
bPopupDialog
- if it is true, the parameter dialog will be activated.public boolean getPopupParamDialog()
public void setPopupErrorDialog(boolean isPopup)
isPopup,
- the value "true" indicates to pop up error message dialog, otherwise do not pop up.public boolean getPopupErrorDialog()
isPopup,
- the value "true" indicates to pop up error message dialog, otherwise do not pop up.public void setServerName(java.lang.String serverName)
serverName
- the name of the server where the report runs.public java.lang.String getServerName()
public void setPort(java.lang.String port)
port
- the port number of the server.public java.lang.String getPort()
public void setLocale(java.util.Locale loc)
public void setLanguage(java.lang.String rptLanguage)
public java.util.Locale getLocale()
public void setFullPath(java.lang.String fullPath)
fullPath
- if you access JReport Servlet, you must set
the servlet path, for example, setFullPath("/jrserver");public java.lang.String getFullPath()
public void setConnection(java.lang.String strURL, java.lang.String strUID, java.lang.String strPSWD, java.lang.String strJdbcDriver)
strURL,
- the URL of the database.strUID,
- the user id for the JDBC driver.strPSWD,
- the password for the JDBC driver.strJdbcDriver,
- the JdbcDriver.public java.lang.String getReportName()
public void setReportName(java.lang.String reportName)
reportName
- the report name.public void setReportVersion(int verNumber)
verNumber
- the report version number. The default value is '-1', which means the last report version.public void setCatName(java.lang.String catName)
catName
- the catalog name.public void setCatalogVersion(int verNumber)
verNumber
- the catalog version number. The default value is '-1', which means the last catalog version.public java.lang.String getCatName()
public void setUserName(java.lang.String userName)
userName
- the user name to log in to JReport Server.public java.lang.String getUserName()
public void setPassword(java.lang.String password)
password
- the password to log in to JReport Server.public java.lang.String getPassword()
public void setProxyUser(java.lang.String proxyUserName)
proxyUserName
- the user name to log in to the proxy server if needed.setProxyPassword(java.lang.String)
public java.lang.String getProxyUser()
getProxyPassword()
public void setProxyPassword(java.lang.String proxyPassword)
proxyPassword
- the password to log in to the proxy server if needed.setProxyUser(java.lang.String)
public java.lang.String getProxyPassword()
getProxyUser()
public void setProxyHost(java.lang.String proxyHost)
proxyHost
- the proxy host name or IP address if needed.setProxyPort(java.lang.String)
public java.lang.String getProxyHost()
getProxyPort()
public void setProxyPort(java.lang.String proxyPort)
proxyPort
- the proxy port number.setProxyHost(java.lang.String)
public java.lang.String getProxyPort()
getProxyHost()
public java.lang.String getLoadReport()
public void setLoadReport(java.lang.String loadReport)
loadReport
- a String, if it equals to "yes"(case insensitive) the report will be run.public void prepareRun()
public java.util.Vector getReports()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public java.util.Vector getReportParams()
public void logout()
public java.lang.String getStatus()
public void setShowInfoLevel(int level)
level
- the debug level, for example, vDebug | vErrorpublic boolean setLogFile(java.lang.String fileName)
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
fileName
- the log file name
public void setSSL(boolean SSL)
SSL
- boolean, indicates whether to use SSL connectionpublic boolean getSSL()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |