jet.bean
Class JRRunViewer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by jet.bean.JRRunViewer
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Externalizable, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, JReportPrintListener

public class JRRunViewer
extends java.awt.Panel
implements java.awt.event.AdjustmentListener, java.io.Externalizable, JReportPrintListener, java.awt.event.ActionListener

This JRRunViewer bean provides methods set parameters and run a report specified by the application in a new frame in the client application. It is a good way to export a report to all supported formats and save it on the client side.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
static int IE
          Indicates the html browser is IE.
static int LANDSCAPE
          The origin is at the bottom left of the paper with x running bottom to top and y running left to right.
static int NETSCAPE
          Deprecated. since v9.1
static int PORTRAIT
          The origin is at the top left of the paper with x running to the right and y running down the paper.
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 log files.
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JRRunViewer()
          The default constructor.
JRRunViewer(boolean showButton)
          The constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void addClickActionListener(jet.thinviewer.ClickActionListener clickActionListener)
          Adds the click action listener.
 void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
           
 void exit()
          When you want to quit from JReport Viewer Bean, you should call this method.
 boolean exportToDhtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNumber, boolean bAbsolute, int iBrowser, boolean drilldown)
          Exports the current report to DHTML, which will be saved at client side.
 boolean exportToDhtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNumber, boolean bAbsolute, int iBrowser, boolean drilldown, boolean noMarginHtml)
          Exports the current report to DHTML, which will be saved at client side.
 boolean exportToDhtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNumber, boolean bAbsolute, int iBrowser, boolean drilldown, boolean noMarginHtml, int resolution)
          Exports the current report to DHTML, which will be saved at client side.
 boolean exportToDhtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNumber, boolean bAbsolute, int iBrowser, boolean drilldown, boolean noMarginHtml, int resolution, int overflow)
          Exports the current report to DHTML, which will be saved at client side.
 boolean exportToHtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNumber, boolean bAbsolute, int iBrowser, boolean drilldown)
          Exports the current report to HTML, which will be saved at client side.
 boolean exportToHtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNumber, boolean bAbsolute, int iBrowser, boolean drilldown, boolean noMarginHtml)
          Exports the current report to HTML, which will be saved at client side.
 boolean exportToHtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNumber, boolean bAbsolute, int iBrowser, boolean drilldown, boolean noMarginHtml, boolean isDhtml)
          Exports the current report to HTML, which will be saved at client side.
 boolean exportToHtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNumber, boolean bAbsolute, int iBrowser, boolean drilldown, boolean noMarginHtml, boolean isDhtml, int resolution)
          Exports the current report to HTML, which will be saved at client side.
 boolean exportToHtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNumber, boolean bAbsolute, int iBrowser, boolean drilldown, boolean noMarginHtml, boolean isDhtml, int resolution, int overflow)
          Exports the current report to HTML, which will be saved at client side.
 boolean exportToHtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNumber, boolean bAbsolute, int iBrowser, boolean drilldown, boolean noMarginHtml, boolean isDhtml, int resolution, int overflow, int chartFormat)
          Exports the current report to HTML, which will be saved at client side.
 boolean exportToPdf(java.lang.String pdfFileName)
          Exports the current report to a PDF file, which will be saved at client side.
 boolean exportToPdf(java.lang.String pdfFileName, boolean noMarginPdf)
          Exports the current report to a PDF file.
 boolean exportToPdf(java.lang.String pdfFileName, boolean noMarginPdf, boolean isSimPrintMode)
          Exports the current report to a PDF file, which will be saved at client side.
 boolean exportToPdf(java.lang.String pdfFileName, boolean noMarginPdf, boolean isSimPrintMode, boolean isCompressImage)
          Exports the current report to a PDF file, which will be saved at client side.
 boolean exportToPdf(java.lang.String pdfFileName, boolean noMarginPdf, boolean isSimPrintMode, int isCompressImage, boolean isGifTrans)
          Exports the current report to a PDF file, which will be saved at client side.
 boolean exportToPdf(java.lang.String pdfFileName, boolean noMarginPdf, boolean isSimPrintMode, int isCompressImage, boolean isGifTrans, boolean isToc, boolean isDrilldown)
          Exports the current report to a PDF file, which will be saved at client side.
 boolean exportToPdf(java.lang.String pdfFileName, boolean noMarginPdf, boolean isSimPrintMode, int isCompressImage, boolean isGifTrans, boolean isToc, boolean isDrilldown, java.lang.String pdfPassword)
          Exports the current report to a PDF file, which will be saved at client side.
 boolean exportToPS(java.lang.String psFileName)
          Exports the current report to a PS (PostScript) file, which will be saved at client side.
 boolean exportToPS(java.lang.String psFileName, boolean noMarginPs)
          Exports the current report to a PS (PostScript) file, which will be saved at client side.
 boolean exportToRst(java.lang.String rstFileName)
          Exports the current report to a result file (with the .rst extension), which will be saved at client side.
 boolean exportToRtf(java.lang.String rtfFileName)
          Exports the current report to RTF (Rich Text Format), which will be saved at client side.
 boolean exportToRtf(java.lang.String rtfFileName, boolean noMarginRtf)
          Exports the current report to RTF (Rich Text Format), which will be saved at client side.
 boolean exportToText(java.lang.String txtFileName, boolean isNormalText, boolean isRepeat, char delimiter)
          Exports the current report to a TEXT file, which will be saved at client side.
 boolean exportToText(java.lang.String txtFileName, boolean isNormalText, boolean isRepeat, char delimiter, int charWidth, int charHeight)
          Exports the current report to a TEXT file, which will be saved at client side.
 boolean exportToText(java.lang.String txtFileName, boolean isNormalText, boolean isRepeat, char delimiter, int charWidth, int charHeight, boolean isQuoteMark)
          Exports the current report to a TEXT file, which will be saved at client side.
 boolean exportToText(java.lang.String txtFileName, boolean isNormalText, boolean isRepeat, char delimiter, int charWidth, int charHeight, boolean isQuoteMark, boolean hasHeadfoot, boolean bTxtCompress)
          Exports the current report to a TEXT file, which will be saved at client side.
 boolean exportToText(java.lang.String txtFileName, boolean isNormalText, boolean isRepeat, char delimiter, int charWidth, int charHeight, boolean isQuoteMark, boolean hasHeadfoot, boolean bTxtCompress, boolean forWindows)
          Exports the current report to a TEXT file, which will be saved at client side.
 boolean exportToText(java.lang.String txtFileName, boolean isNormalText, boolean isRepeat, char delimiter, int charWidth, int charHeight, boolean isQuoteMark, boolean hasHeadfoot, boolean bTxtCompress, boolean forWindows, boolean isCsv, boolean isTab)
          Exports the current report to a TEXT file, which will be saved at client side.
 boolean exportToXls(java.lang.String xlsFileName)
          Exports the current report to BIFF (Binary File Format), which will be saved at client side.
 boolean exportToXls(java.lang.String xlsFileName, boolean excelLayout)
          Exports the current report to BIFF(Binary File Format), which will be saved at client side.
 boolean exportToXls(java.lang.String xlsFileName, int wordWrap)
          Exports the current report to BIFF (Binary File Format), which will be saved at client side.
 boolean exportToXls(java.lang.String xlsFileName, int wordWrap, boolean excel2000)
          Exports the current report to BIFF (Binary File Format), which will be saved at client side.
 boolean exportToXls(java.lang.String xlsFileName, int wordWrap, boolean excel2000, boolean hasShapes)
          Exports the current report to BIFF (Binary File Format), which will be saved at client side.
 boolean exportToXls(java.lang.String xlsFileName, int wordWrap, boolean excel2000, boolean hasShapes, boolean excelLayout)
          Exports the current report to BIFF (Binary File Format), which will be saved at client side.
 boolean exportToXML(java.lang.String xmlFileName)
          Exports the current report to XML, which will be saved at client side.
 boolean exportToXML(java.lang.String xmlFileName, boolean isOnlyData)
          Exports the current report to XML, which will be saved at client side.
 boolean exportToXML(java.lang.String xmlFileName, boolean isMultiFiles, boolean isOnlyData)
          Deprecated. As of JREntViewer version 5.1,
 boolean exportToXML(java.lang.String xmlFileName, boolean isOnlyData, java.lang.String xsdFile)
          Exports the current report to XML, which will be saved at client side.
 java.lang.String firstPage()
          Enables to go to the first page of report.
static java.util.Vector getAllMediaTray(java.lang.String printerName)
          for getting all media trays for specifying printer.
static java.util.Vector getAllPrinters()
          for getting all the printers in the system.
 java.lang.String getCatName()
          Gets the catalog name.
 java.lang.String getCountry()
          Gets the country.
 int getCurrentPageNumber()
          Gets the current page number of the report.
 java.lang.String getEncoding()
          Gets the encoding.
 java.lang.String getFullPath()
          Gets the full path for JReport Servlet.
 java.lang.String getLanguage()
          Gets the language.
 java.lang.String getLoadReport()
           
 java.util.Locale getLocale()
          Gets the locale.
 java.awt.Dimension getMinimumSize()
           
 int getPageOrientation()
          Gets the page orientation.
 java.lang.String getParameters()
          Gets the parameter value(s) of the report.
 java.util.Hashtable getParamsHashtable()
          Gets the parameter value(s) Hashtable of the report.
 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.
 java.lang.String getPort()
          Gets the port number of the server.
 java.awt.Dimension getPreferredSize()
           
 java.lang.String getPrintStatus()
          Gets the print status after printing.
 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.lang.String getReportSheetName()
          Gets the report sheet name.
 boolean getScrollbars()
          Tells users whether there are scrollbars or not.
 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 getStyle()
          Gets the style group.
 java.lang.String getTaskListener()
          Gets the task listener class's name
 java.lang.String getTempPath()
          Gets the temporary path.
 int getTotalPageNumber()
          Gets the total page number of the report.
 java.lang.String getUserName()
          Gets the user name to log in to JReport Server.
 boolean getViewInNewFrame()
          Gets the status about whether the report will be viewed in a new Frame.
 int gotoPage(int pageNumber)
          Enables to go to the specified page of the report.
 boolean hasScrollbars()
          Tells users whether there are scrollbars or not.
static boolean isJDK14Compatible()
           
 boolean isShowButton()
          Returns the status whether to show the turning page buttons.
 java.lang.String lastPage()
          Enables to go to the last page of the report.
 boolean loadReport(RandomInputable rInputable)
           
 boolean loadReport(java.lang.String urlView)
           
 void logout()
          Enables to log out from JReport Server.
 void modifyDbUserInfo(java.lang.String sDbUserName, java.lang.String sDbPassword)
          Modifies the User and Password information in the specified database connection description.
 java.lang.String nextPage()
          Enables to go to the next page of the report.
 java.lang.String prevPage()
          Enables to go to the previous page of the report.
 void printEnd()
          Listener when printing ends.
 void printReport()
          Prints the report.
 void printReport(java.lang.Object job, boolean bInteractive, java.lang.Object pageFormat, boolean bInBackground, JReportPrintListener jreportprintlistener, int useJDK, java.lang.String jobName, java.util.Vector attributeInfo, java.lang.String printer)
          Prints the report with the specified parameters.
 void printReport(java.lang.Object printJob, java.lang.Object pageFormat, boolean bInteractive, boolean bInBackground, boolean bUseJDK11)
          Prints the report with the specified parameters.
 void printReport(java.lang.Object printJob, java.lang.Object pageFormat, boolean bInteractive, boolean bInBackground, boolean bUseJDK11, boolean bSeparateLargePage)
          Prints the report with the special parameters.
 void printReportJDK14(boolean bInteractive, boolean bInBackground, JReportPrintListener jreportprintlistener, java.lang.String jobName, java.util.Vector attributeInfo, java.util.Vector customMedias, java.lang.String printer)
          Prints the report with the specified parameters.
 void printStart()
          Listener when printing starts.
 void readExternal(java.io.ObjectInput in)
           
 void runReport()
          Launches to run JReport Viewer Bean.
 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 setConnection(java.lang.String strURL, java.lang.String strUID, java.lang.String strPSWD, java.lang.String strJdbcDriver, boolean jdbcGetSupportInfo)
          Sets the connection required to run the engine.
 void setCountry(java.lang.String rptCountry)
          Sets the country.
 void setEncoding(java.lang.String rptEncoding)
          Sets the encoding.
 void setFullPath(java.lang.String fullPath)
          Sets the full path for JReport Servlet.
 void setLanguage(java.lang.String rptLanguage)
          Sets the language.
 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 file name.
 void setNamedWherePortion(java.lang.String name)
          Sets the where portion name of the query.
 void setParameters(java.lang.String parameters)
          Sets the value(s) of parameter(s) needed by the current report.
 void setParamsHashtable(java.util.Hashtable ht)
          Sets the parameter value(s) of the report.
 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 Exception occurs.
 void setPort(java.lang.String port)
          Sets the port number of the server, for example 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 setRandomInput(RandomInputable rInputable)
           
 void setReportName(java.lang.String reportName)
          Sets the report name.
 void setReportSheetName(java.lang.String reportSheetName)
          Sets the report sheet name.
 void setReportVersion(int verNumber)
          Sets the report version number.
 void setScrollbars(boolean b)
          Allows users to set scrollbars.
 void setServerName(java.lang.String serverName)
          Sets the server name or IP address.
 void setShowButton(boolean bShowButton)
          Sets the status whether to show the turning page buttons or not.
 void setShowInfoLevel(int level)
          Enables/disables to output the error and debug message.
 void setSSL(boolean SSL)
          Sets the connection to use SSL or not.
 void setStyle(java.lang.String rptStyle)
          Sets the style group.
 void setTaskListener(java.lang.String taskListenerClass)
          Sets the task listener class
 void setTempPath(java.lang.String sTempPath)
          Sets the temporary path.
 void setURLAddress(java.lang.String sURLAddress)
           
 void setUserName(java.lang.String userName)
          Sets the user name to log in to JReport Server.
 void setViewInNewFrame(boolean isViewInNewFrame)
          Sets the property to indicate whether to view the report in a new Frame or not.
 void setWherePortion(java.lang.String where)
          Sets the where portion name of the query.
 void writeExternal(java.io.ObjectOutput out)
           
 void zoom(int zoomRatio)
          Zooms the report.
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

vOff

public static final int vOff
Indicates to close the debug and log files.

See Also:
Constant Field Values

vDebug

public static final int vDebug
Indicates to open the debug log.

See Also:
Constant Field Values

vError

public static final int vError
Indicates to open the error log.

See Also:
Constant Field Values

LANDSCAPE

public static final int LANDSCAPE
The origin is at the bottom left of the paper with x running bottom to top and y running left to right. Note that this is not the Macintosh landscape but is the Window's and PostScript landscape.

See Also:
Constant Field Values

PORTRAIT

public static final int PORTRAIT
The origin is at the top left of the paper with x running to the right and y running down the paper.

See Also:
Constant Field Values

IE

public static final int IE
Indicates the html browser is IE.

See Also:
Constant Field Values

NETSCAPE

public static final int NETSCAPE
Deprecated. since v9.1
Indicates the html browser is NETSCAPE.

See Also:
Constant Field Values
Constructor Detail

JRRunViewer

public JRRunViewer()
The default constructor.


JRRunViewer

public JRRunViewer(boolean showButton)
The constructor.

Parameters:
showButton - boolean type, if it is true, the turning page buttons will be shown.
Method Detail

setURLAddress

public void setURLAddress(java.lang.String sURLAddress)

setRandomInput

public void setRandomInput(RandomInputable rInputable)

addClickActionListener

public void addClickActionListener(jet.thinviewer.ClickActionListener clickActionListener)
Adds the click action listener.

Parameters:
clickActionListener - listens to the event when clicking on a field in viewer.

setTempPath

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

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

getTempPath

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


setViewInNewFrame

public void setViewInNewFrame(boolean isViewInNewFrame)
Sets the property to indicate whether to view the report in a new Frame or not.

Parameters:
isViewInNewFrame - Boolean, indicates whether to view the report in a new Frame.

getViewInNewFrame

public boolean getViewInNewFrame()
Gets the status about whether the report will be viewed in a new Frame.


setPopupErrorDialog

public void setPopupErrorDialog(boolean isPopup)
Allows users to set whether to pop up the error message dialog when Exception occurs.

Parameters:
isPopup, - the value "true" indicates to pop up error message dialog, otherwise do not pop up.

getPopupErrorDialog

public boolean getPopupErrorDialog()
Gets the value about whether to pop up error message dialog.

Parameters:
isPopup, - the value "true" indicates to pop up error message dialog, otherwise do not pop up.

setServerName

public void setServerName(java.lang.String serverName)
Sets the server name or IP address.

Parameters:
serverName - the name of the server where the report runs.

getServerName

public java.lang.String getServerName()
Gets the server name or IP address where the report runs.

Returns:
serverName the name or address of the current server.

setPort

public void setPort(java.lang.String port)
Sets the port number of the server, for example 8888.

Parameters:
port - the port number of the server.

getPort

public java.lang.String getPort()
Gets the port number of the server.

Returns:
the port number of the server.

setLocale

public void setLocale(java.util.Locale loc)
Sets the locale.

Overrides:
setLocale in class java.awt.Component

getLocale

public java.util.Locale getLocale()
Gets the locale.

Overrides:
getLocale in class java.awt.Component

setLanguage

public void setLanguage(java.lang.String rptLanguage)
Sets the language.


getLanguage

public java.lang.String getLanguage()
Gets the language.


setCountry

public void setCountry(java.lang.String rptCountry)
Sets the country.


getCountry

public java.lang.String getCountry()
Gets the country.


setEncoding

public void setEncoding(java.lang.String rptEncoding)
Sets the encoding.


getEncoding

public java.lang.String getEncoding()
Gets the encoding.


setStyle

public void setStyle(java.lang.String rptStyle)
Sets the style group.


getStyle

public java.lang.String getStyle()
Gets the style group.


setFullPath

public void setFullPath(java.lang.String fullPath)
Sets the full path for JReport Servlet.

Parameters:
fullPath - if you access JReport Servlet, you must set the servlet path, for example, setFullPath("/jrserver");

getFullPath

public java.lang.String getFullPath()
Gets the full path for JReport Servlet.

Returns:
the full path.

setScrollbars

public void setScrollbars(boolean b)
Allows users to set scrollbars.

Parameters:
b - if true, there are scrollbars; otherwise, no scrollbars.

hasScrollbars

public boolean hasScrollbars()
Tells users whether there are scrollbars or not. return if true, there are scrollbars; otherwise, no scrollbars.


getScrollbars

public boolean getScrollbars()
Tells users whether there are scrollbars or not. return if true, there are scrollbars; otherwise, no scrollbars.


getTaskListener

public java.lang.String getTaskListener()
Gets the task listener class's name

Returns:
the class name, return null if task listener is not specified.
See Also:
TaskListener

setTaskListener

public void setTaskListener(java.lang.String taskListenerClass)
Sets the task listener class

Parameters:
java - class's name which implemented API TaskListener, null if there needn't be task listener.
See Also:
TaskListener

getReportName

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

Returns:
the report name.

setReportName

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

Parameters:
reportName - the report name.

getReportSheetName

public java.lang.String getReportSheetName()
Gets the report sheet name.

Returns:
the report sheet name.

setReportSheetName

public void setReportSheetName(java.lang.String reportSheetName)
Sets the report sheet name.

Parameters:
reportSheetName - the report sheet name.

setReportVersion

public void setReportVersion(int verNumber)
Sets the report version number.

Parameters:
verNumber - the report version number. The default value is '-1', which means the latest report version.

setCatName

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

Parameters:
catName - the catalog name.

setCatalogVersion

public void setCatalogVersion(int verNumber)
Sets the catalog version number.

Parameters:
verNumber - the catalog version number. The default value is '-1', which means the latest catalog version.

getCatName

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

Returns:
the catalog name

getParameters

public java.lang.String getParameters()
Gets the parameter value(s) of the report.

Returns:
the parameter value(s) of the report.

setParameters

public void setParameters(java.lang.String parameters)
Sets the value(s) of parameter(s) needed by the current report.

Parameters:
parameters - the parameter value(s) needed by the report.

getParamsHashtable

public java.util.Hashtable getParamsHashtable()
Gets the parameter value(s) Hashtable of the report.

Returns:
a Hashtable which contains pairs of parameter and value(s) (parameter<==>value(s)), the key is PARAMETER_NAME, the value is the value of the parameter. If the parameter supports multiple choices, there will be multiple value mark like this, APIConst.TAG_PARAM_IS_MULTIPLE_PREFIX + "$" + PARAMETER_NAME="true", and the parameter value will be a String array, otherwise a String.

setParamsHashtable

public void setParamsHashtable(java.util.Hashtable ht)
Sets the parameter value(s) of the report.

Parameters:
ht - which contains pairs of parameter and value(s) (parameter<==>value(s)), the key is PARAMETER_NAME, the value is the value of the parameter. If the parameter supports multiple choices, firstly you must set the multiple value mark as true, APIConst.TAG_PARAM_IS_MULTIPLE_PREFIX + " $" + PARAMETER_NAME="true", for example, ht.put(APIConst.TAG_PARAM_IS_MULTIPLE_PREFIX + "$" + "Parameter1", "true"), then the parameter value must be a String array, otherwise a String.

setUserName

public void setUserName(java.lang.String userName)
Sets the user name to log in to JReport Server.

Parameters:
userName - the user name to log in to JReport Server.

getUserName

public java.lang.String getUserName()
Gets the user name to log in to JReport Server.

Returns:
the user name to log in to JReport Server.

setPassword

public void setPassword(java.lang.String password)
Sets the password to log in to JReport Server.

Parameters:
password - the password to log in to JReport Server.

getPassword

public java.lang.String getPassword()
Gets the password to log in to JReport Server.

Returns:
the password to log in to JReport Server.

modifyDbUserInfo

public void modifyDbUserInfo(java.lang.String sDbUserName,
                             java.lang.String sDbPassword)
Modifies the User and Password information in the specified database connection description. Note: A connection contains the tables, views, stored procedures and file queries. The queries, formulas and summaries also depend on the connection. Please be careful when you call this method.


setProxyUser

public void setProxyUser(java.lang.String proxyUserName)
Sets the user name to log in to the proxy server if needed.

Parameters:
proxyUserName - the user name to log in to the proxy server if needed.
See Also:
setProxyPassword(java.lang.String)

getProxyUser

public java.lang.String getProxyUser()
Returns the user name to log in to the proxy server.

See Also:
getProxyPassword()

setProxyPassword

public void setProxyPassword(java.lang.String proxyPassword)
Sets the password to log in to the proxy server if needed.

Parameters:
proxyPassword - the password to log in to the proxy server if needed.
See Also:
setProxyUser(java.lang.String)

getProxyPassword

public java.lang.String getProxyPassword()
Returns the password to log in to the proxy server if needed.

See Also:
getProxyUser()

setProxyHost

public void setProxyHost(java.lang.String proxyHost)
Sets the proxy host name or IP address if needed.

Parameters:
proxyHost - the proxy host name or IP address if needed.
See Also:
setProxyPort(java.lang.String)

getProxyHost

public java.lang.String getProxyHost()
Returns the proxy host name or IP address.

See Also:
getProxyPort()

setProxyPort

public void setProxyPort(java.lang.String proxyPort)
Sets the proxy port number.

Parameters:
proxyPort - the proxy port number.
See Also:
setProxyHost(java.lang.String)

getProxyPort

public java.lang.String getProxyPort()
Returns the proxy port number.

See Also:
getProxyHost()

getPageOrientation

public int getPageOrientation()
Gets the page orientation.


isShowButton

public boolean isShowButton()
Returns the status whether to show the turning page buttons.


setShowButton

public void setShowButton(boolean bShowButton)
Sets the status whether to show the turning page buttons or not.


getLoadReport

public java.lang.String getLoadReport()

setLoadReport

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

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

runReport

public void runReport()
Launches to run JReport Viewer Bean.


adjustmentValueChanged

public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
Specified by:
adjustmentValueChanged in interface java.awt.event.AdjustmentListener

getMinimumSize

public java.awt.Dimension getMinimumSize()
Overrides:
getMinimumSize in class java.awt.Container

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class java.awt.Container

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

printStart

public void printStart()
Description copied from interface: JReportPrintListener
Listener when printing starts.

Specified by:
printStart in interface JReportPrintListener

printEnd

public void printEnd()
Description copied from interface: JReportPrintListener
Listener when printing ends.

Specified by:
printEnd in interface JReportPrintListener

printReport

public void printReport()
Prints the report.


printReport

public void printReport(java.lang.Object printJob,
                        java.lang.Object pageFormat,
                        boolean bInteractive,
                        boolean bInBackground,
                        boolean bUseJDK11)
Prints the report with the specified 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.2.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, you can call the printReport method like this:
                PrinterJob printJob = PrinterJob.getPrinterJob();
                bean.printReport(printJob, printJob.defaultPage(), false, false, false);
                

printReport

public void printReport(java.lang.Object printJob,
                        java.lang.Object pageFormat,
                        boolean bInteractive,
                        boolean bInBackground,
                        boolean bUseJDK11,
                        boolean bSeparateLargePage)
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.2.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, 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 separate 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 method is not recommended, it may cause some unexpected errors, for example, you may get an extra blank page.

printReport

public void printReport(java.lang.Object job,
                        boolean bInteractive,
                        java.lang.Object pageFormat,
                        boolean bInBackground,
                        JReportPrintListener jreportprintlistener,
                        int useJDK,
                        java.lang.String jobName,
                        java.util.Vector attributeInfo,
                        java.lang.String printer)
                 throws jet.export.print.NoSuchPrintAttributeException
Prints the report with the specified parameters.

Parameters:
job - the print job of this print action. It is an instance of PrintJob or PrinterJob. You can pass a PrinterJob or PrintJob object. If you set a null value, a PrinterJob or PrintJob will be created for your task. There need be a PrintJob object in JDK1.1 or a PrinterJob object in JDK1.2, JDK1.4 print method. If you pass a printerjob which is not a null value and set parameter bInteractive to true, information taken by printerjob will be reset by the values from print set up dialog such as Copies,PrintService,JobName.
bInteractive - a boolean value, if you set it to true, present a print setup dialog to the user for changing the properties of the print job. Otherwise the print setup dialog will not show up.
pageFormat - is an instance of PageFormat class, which describes the size and orientation of a page to be printed. The pageFormat will take effect only with JDK1.1 or JDK1.2. We recommend using attributeInfo vector instead of the printFormat object with JDK1.4
bInBackground - a boolean value, if you set it to false, show the printing progress dialog with printing progress bar in it.
jreportprintlistener - is the listener of print. It is an interface which contains two methods printStart() and printEnd(). JeportPrintListener is located in jet.thinview.print package. This interface is useful, when you want to get the print status -- start or end, for example. Otherwise, you can set it to null.
useJDK - an int value, if you set it to 0, it will use JDK1.1 to print the report. If you set it to 1, it will use the JDK1.2 which you are running to print the report. If you set it to 2, it will use the JDK1.4 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. JDK 1.4 provides more options to do print such as specifying tray.
jobName - specifies print job name.
attributeInfo - is a vector whose elements are string. Each String has been defined in interface PrintConfig. For example, you can implement PrintConfig and call its fields like this:
                attributeInfo.add(TRAY_MANUAL);
                attributeInfo.add(ORIENTATION_PORTRAIT);
printer - specifies the printer you want to use. This printer name must be with full path. You can call getAllPrinters() method for jdk 1.4 to get the list of system printers. This printReport method is recommended for jdk 1.4 or above only -- a lot of features are only supported by jdk 1.4 or above. An example of calling this printReport() method:
 
                PrinterJob printJob = PrinterJob.getPrinterJob();
                Vector attributeInfo = new Vector();
                attributeInfo.add(TRAY_MANUAL);
                attributeInfo.add(ORIENTATION_PORTRAIT);
                bean.printReport(printJob, true,printJob.defaultPage(),
                                                         false,null,2,"JReport",
                                                        attributeInfo,"\\\\192.168.128.111\\Samsung SCX-5x12 Series PCL 6");
                                                        
Throws:
jet.export.print.NoSuchPrintAttributeException

printReportJDK14

public void printReportJDK14(boolean bInteractive,
                             boolean bInBackground,
                             JReportPrintListener jreportprintlistener,
                             java.lang.String jobName,
                             java.util.Vector attributeInfo,
                             java.util.Vector customMedias,
                             java.lang.String printer)
                      throws jet.export.print.NoSuchPrintAttributeException
Prints the report with the specified parameters.

Parameters:
bInteractive - a boolean value, if you set it to true, present a print setup dialog to the user for changing the properties of the print job. Otherwise the print setup dialog will not show up.
bInBackground - a boolean value, if you set it to false, show the printing progress dialog with printing progress bar in it.
jreportprintlistener - is the listener of print. It is an interface which contains two methods printStart() and printEnd(). This interface is useful, when you want to get the print status -- start or end, for example. Otherwise, you can set it to null.
jobName - specifies print job name.
attributeInfo - is a vector whose elements are string. Each String has been defined in interface PrintConfig. For example, you can implement PrintConfig and call its fields like this:
    attributeInfo.add(TRAY_MANUAL);
    attributeInfo.add(ORIENTATION_PORTRAIT);
    
customMedias - is a vector whose elements are some instances of CustomMedia. Until now, JReport provides the following CustomMedia: CustomMediaCopies,CustomMediaMargin,CustomMediaTray. CustomMediaCopies indicates printed copies. CustomMediaMargin indicates page margin when printing. You may create an instance of CustomMediaMargin which includes four values representing left, right, top and bottom margin. CustomMediaTray indicates special tray which is not standard tray defined in java. If you want to specify a special tray, you must specify a printer name. Otherwise JReport will find this tray in default printer. If the specified printer does not have such a tray, a NoSuchPrintAttributeException will be thrown. If needed, you may get all media tray's names in a special printer by calling getAllMediaTray(String printerName). You may create an instance of customMedias like below:
    Vector customMedias = new Vector();
    customMedias.add();
    customMedias.add(new CustomMediaCopies(2));
    customMedias.add(new CustomMediaMargin(10f, 12f, 10f, 15f,CustomMediaMargin.MM));
    customMedias.add(new CustomMediaMargin(0.8f, 1f, 1.5f, 0.8f,CustomMediaMargin.INCH));
    customMedias.add(new CustomMediaTray("Multi-Purpose Tray"));
    
printer - specifies the printer you want to use. This printer name must be with full path. You can call getAllPrinters() method for jdk 1.4 to get the list of system printers. This printReportJDK14 method is only for jdk 1.4 or above. An example of calling this printReportJDK14() method:
 
      PrinterJob job = PrinterJob.getPrinterJob();
      Vector attributeInfo = new Vector();
      attributeInfo.add(PrintConfig.ORIENTATION_LANDSCAPE);  
      Vector customMedias = new Vector();        
      customMedias.add(new CustomMediaCopies(2));
      customMedias.add(new CustomMediaMargin(0.8f, 1f, 1.5f, 2f,CustomMediaMargin.INCH));
      customMedias.add(new CustomMediaTray("Multi-Purpose Tray"));
      try
      {
        bean.printReportJDK14(true,false,null,"jobname", attributeInfo,customMedias,"\\\\192.168.128.111\\Samsung SCX-5x12 Series PCL 6");
      }catch(NoSuchPrintAttributeException ec)
      {
        System.out.println(ec);
      }
      
Throws:
jet.export.print.NoSuchPrintAttributeException

isJDK14Compatible

public static boolean isJDK14Compatible()

getAllMediaTray

public static java.util.Vector getAllMediaTray(java.lang.String printerName)
                                        throws jet.export.print.NoSuchPrintAttributeException
for getting all media trays for specifying printer. Only can do this in JDK14 and advanced JDK version

Throws:
jet.export.print.NoSuchPrintAttributeException

getAllPrinters

public static java.util.Vector getAllPrinters()
for getting all the printers in the system. Only can do this in JDK14 and advanced JDK version


getPrintStatus

public java.lang.String getPrintStatus()
Gets the print status after printing.


loadReport

public boolean loadReport(java.lang.String urlView)
                   throws java.io.IOException
Throws:
java.io.IOException

loadReport

public boolean loadReport(RandomInputable rInputable)
                   throws java.io.IOException
Throws:
java.io.IOException

setNamedWherePortion

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


setWherePortion

public void setWherePortion(java.lang.String where)
Sets the where portion name of the query.


exportToRst

public boolean exportToRst(java.lang.String rstFileName)
Exports the current report to a result file (with the .rst extension), which will be saved at client side.

Parameters:
rstFileName - the result file name.
Returns:
true if exported successfully.

exportToDhtml

public boolean exportToDhtml(java.lang.String htmlFileName,
                             boolean bChartApplet,
                             boolean isMultiFile,
                             boolean bUsingTable,
                             boolean bHyperlink,
                             boolean bPageNumber,
                             boolean bAbsolute,
                             int iBrowser,
                             boolean drilldown)
Exports the current report to DHTML, which will be saved at client side.

Parameters:
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet.
isMultiFile - indicates whether to export the html to a file or to multiple files.
bUsingTable - indicates whether to use html table format when exporting html files
bHyperlink - indicates whether to generate a hyperlink
bPageNumber - indicates whether to generate page numbers
bAbsolute - indicates the font size is absolute or relative
iBrowser - indicates the browser is IE or Firefox. The value of parameter int browser must be one of thFirefoxFirefox.
drilldown - indicates whether to enable drilldown in the html files.
Returns:
true if exported successfully.

exportToDhtml

public boolean exportToDhtml(java.lang.String htmlFileName,
                             boolean bChartApplet,
                             boolean isMultiFile,
                             boolean bUsingTable,
                             boolean bHyperlink,
                             boolean bPageNumber,
                             boolean bAbsolute,
                             int iBrowser,
                             boolean drilldown,
                             boolean noMarginHtml)
Exports the current report to DHTML, which will be saved at client side.

Parameters:
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet.
isMultiFile - indicates whether to export the html to a file or to multiple files.
bUsingTable - indicates whether to use html table format when exporting html files
bHyperlink - indicates whether to generate a hyperlink
bPageNumber - indicates whether to generate page numbers
bAbsolute - indicates the font size is absolute or relative
iBrowser - indicates the browser is IE or Firefox. The value of parameter int browser must be one of the IE or Firefox.
drilldown - indicates whether to enable drilldown in the html files.
noMarginHtml - indicates to generate the html files without page Margin.
Returns:
true if exported successfully.

exportToDhtml

public boolean exportToDhtml(java.lang.String htmlFileName,
                             boolean bChartApplet,
                             boolean isMultiFile,
                             boolean bUsingTable,
                             boolean bHyperlink,
                             boolean bPageNumber,
                             boolean bAbsolute,
                             int iBrowser,
                             boolean drilldown,
                             boolean noMarginHtml,
                             int resolution)
Exports the current report to DHTML, which will be saved at client side.

Parameters:
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet.
isMultiFile - indicates whether to export the html to a file or to multiple files.
bUsingTable - indicates whether to use html table format when exporting html files
bHyperlink - indicates whether to generate a hyperlink
bPageNumber - indicates whether to generate page numbers
bAbsolute - indicates the font size is absolute or relative
iBrowser - indicates the browser is IE or Firefox. The value of parameter int browser must be one of the IE or Firefox.
drilldown - indicates whether to enable drilldown in the html files.
noMarginHtml - indicates to generate the html files without page Margin.
resolution - indicates the resolution of the HTML file.
Returns:
true if exported successfully.

exportToDhtml

public boolean exportToDhtml(java.lang.String htmlFileName,
                             boolean bChartApplet,
                             boolean isMultiFile,
                             boolean bUsingTable,
                             boolean bHyperlink,
                             boolean bPageNumber,
                             boolean bAbsolute,
                             int iBrowser,
                             boolean drilldown,
                             boolean noMarginHtml,
                             int resolution,
                             int overflow)
Exports the current report to DHTML, which will be saved at client side.

Parameters:
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet.
isMultiFile - indicates whether to export the html to a file or to multiple files.
bUsingTable - indicates whether to use html table format when exporting html files
bHyperlink - indicates whether to generate a hyperlink
bPageNumber - indicates whether to generate page numbers
bAbsolute - indicates the font size is absolute or relative
iBrowser - indicates the browser is IE or Firefox. The value of parameter int browser must be one of the IE or Firefox.
drilldown - indicates whether to enable drilldown in the html files.
noMarginHtml - indicates to generate the html files without page Margin.
resolution - indicates the resolution of the HTML file.
overflow - indicates the text overflow type of the html file.
Returns:
true if exported successfully.

exportToHtml

public boolean exportToHtml(java.lang.String htmlFileName,
                            boolean bChartApplet,
                            boolean isMultiFile,
                            boolean bUsingTable,
                            boolean bHyperlink,
                            boolean bPageNumber,
                            boolean bAbsolute,
                            int iBrowser,
                            boolean drilldown)
Exports the current report to HTML, which will be saved at client side.

Parameters:
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet.
isMultiFile - indicates whether to export the html to a file or to multiple files.
bUsingTable - indicates whether to use html table format when exporting html files
bHyperlink - indicates whether to generate a hyperlink
bPageNumber - indicates whether to generate page numbers
bAbsolute - indicates the font size is absolute or relative
iBrowser - indicates the browser is IE or Firefox. The value of parameter int browser must be one of the IE or Firefox.
drilldown - indicates whether to enable drilldown in the html files.
Returns:
true if exported successfully.

exportToHtml

public boolean exportToHtml(java.lang.String htmlFileName,
                            boolean bChartApplet,
                            boolean isMultiFile,
                            boolean bUsingTable,
                            boolean bHyperlink,
                            boolean bPageNumber,
                            boolean bAbsolute,
                            int iBrowser,
                            boolean drilldown,
                            boolean noMarginHtml)
Exports the current report to HTML, which will be saved at client side.

Parameters:
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet.
isMultiFile - indicates whether to export the html to a file or to multiple files.
bUsingTable - indicates whether to use html table format when exporting html files
bHyperlink - indicates whether to generate a hyperlink
bPageNumber - indicates whether to generate page numbers
bAbsolute - indicates the font size is absolute or relative
iBrowser - indicates the browser is IE or Firefox. The value of parameter int browser must be one of the IE or Firefox.
drilldown - indicates whether to enable drilldown in the html files.
noMarginHtml - indicates to generate the html files without page Margin.
Returns:
true if exported successfully.

exportToHtml

public boolean exportToHtml(java.lang.String htmlFileName,
                            boolean bChartApplet,
                            boolean isMultiFile,
                            boolean bUsingTable,
                            boolean bHyperlink,
                            boolean bPageNumber,
                            boolean bAbsolute,
                            int iBrowser,
                            boolean drilldown,
                            boolean noMarginHtml,
                            boolean isDhtml)
Exports the current report to HTML, which will be saved at client side.

Parameters:
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet.
isMultiFile - indicates whether to export the html to a file or to multiple files.
bUsingTable - indicates whether to use html table format when exporting html files
bHyperlink - indicates whether to generate a hyperlink
bPageNumber - indicates whether to generate page numbers
bAbsolute - indicates the font size is absolute or relative
iBrowser - indicates the browser is IE or Firefox. The value of parameter int browser must be one of the IE or Firefox.
drilldown - indicates whether to enable drilldown in the html files.
noMarginHtml - indicates to generate the html files without page Margin.
isDhtml - indicates if the file has DHTML format.
Returns:
true if exported successfully.

exportToHtml

public boolean exportToHtml(java.lang.String htmlFileName,
                            boolean bChartApplet,
                            boolean isMultiFile,
                            boolean bUsingTable,
                            boolean bHyperlink,
                            boolean bPageNumber,
                            boolean bAbsolute,
                            int iBrowser,
                            boolean drilldown,
                            boolean noMarginHtml,
                            boolean isDhtml,
                            int resolution)
Exports the current report to HTML, which will be saved at client side.

Parameters:
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet.
isMultiFile - indicates whether to export the html to a file or to multiple files.
bUsingTable - indicates whether to use html table format when exporting html files
bHyperlink - indicates whether to generate a hyperlink
bPageNumber - indicates whether to generate page numbers
bAbsolute - indicates the font size is absolute or relative
iBrowser - indicates the browser is IE or Firefox. The value of parameter int browser must be one of the IE or Firefox.
drilldown - indicates whether to enable drilldown in the html files.
noMarginHtml - indicates to generate the html files without page Margin.
isDhtml - indicates if the file has DHTML format.
resolution - indicates the resolution of the HTML file.
Returns:
true if exported successfully.

exportToHtml

public boolean exportToHtml(java.lang.String htmlFileName,
                            boolean bChartApplet,
                            boolean isMultiFile,
                            boolean bUsingTable,
                            boolean bHyperlink,
                            boolean bPageNumber,
                            boolean bAbsolute,
                            int iBrowser,
                            boolean drilldown,
                            boolean noMarginHtml,
                            boolean isDhtml,
                            int resolution,
                            int overflow)
Exports the current report to HTML, which will be saved at client side.

Parameters:
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet.
isMultiFile - indicates whether to export the html to a file or to multiple files.
bUsingTable - indicates whether to use html table format when exporting html files
bHyperlink - indicates whether to generate a hyperlink
bPageNumber - indicates whether to generate page numbers
bAbsolute - indicates the font size is absolute or relative
iBrowser - indicates the browser is IE or Firefox. The value of parameter int browser must be one of the IE or Firefox.
drilldown - indicates whether to enable drilldown in the html files.
noMarginHtml - indicates to generate the html files without page Margin.
isDhtml - indicates if the file has DHTML format.
resolution - indicates the resolution of the HTML file.
overflow - indicates the text overflow type of the html file.
Returns:
true if exported successfully.

exportToHtml

public boolean exportToHtml(java.lang.String htmlFileName,
                            boolean bChartApplet,
                            boolean isMultiFile,
                            boolean bUsingTable,
                            boolean bHyperlink,
                            boolean bPageNumber,
                            boolean bAbsolute,
                            int iBrowser,
                            boolean drilldown,
                            boolean noMarginHtml,
                            boolean isDhtml,
                            int resolution,
                            int overflow,
                            int chartFormat)
Exports the current report to HTML, which will be saved at client side.

Parameters:
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet.
isMultiFile - indicates whether to export the html to a file or to multiple files.
bUsingTable - indicates whether to use html table format when exporting html files
bHyperlink - indicates whether to generate a hyperlink
bPageNumber - indicates whether to generate page numbers
bAbsolute - indicates the font size is absolute or relative
iBrowser - indicates the browser is IE or Firefox. The value of parameter int browser must be one of the IE or Firefox.
drilldown - indicates whether to enable drilldown in the html files.
noMarginHtml - indicates to generate the html files without page Margin.
isDhtml - indicates if the file has DHTML format.
resolution - indicates the resolution of the HTML file.
overflow - indicates the text overflow type of the html file.
Returns:
true if exported successfully.

exportToPdf

public boolean exportToPdf(java.lang.String pdfFileName)
Exports the current report to a PDF file, which will be saved at client side.

Parameters:
pdfFileName - the name of the PDF file.
Returns:
true if exported successfully.

exportToPdf

public boolean exportToPdf(java.lang.String pdfFileName,
                           boolean noMarginPdf)
Exports the current report to a PDF file.

Parameters:
pdfFileName - the name of the PDF file.
noMarginPdf - indicates to generate the pdf file without page margin.
Returns:
true if exported successfully.

exportToPdf

public boolean exportToPdf(java.lang.String pdfFileName,
                           boolean noMarginPdf,
                           boolean isSimPrintMode)
Exports the current report to a PDF file, which will be saved at client side.

Parameters:
pdfFileName - the name of the PDF file.
noMarginPdf - indicates to generate the pdf file without page margin.
isSimPrintMode - If true, generate charts and barcodes using vector graphics. If false, generate charts and barcodes using images. The recommended value is false.
Returns:
true if exported successfully.

exportToPdf

public boolean exportToPdf(java.lang.String pdfFileName,
                           boolean noMarginPdf,
                           boolean isSimPrintMode,
                           boolean isCompressImage)
Exports the current report to a PDF file, which will be saved at client side.

Parameters:
pdfFileName - the name of the PDF file.
noMarginPdf - indicates to generate the pdf file without page margin.
isSimPrintMode - If true, generate charts and barcodes using vector graphics. If false, generate charts and barcodes using images. The recommended value is false.
isCompressImage - indicates whether to compress the images in the pdf file.
Returns:
true if exported successfully.

exportToPdf

public boolean exportToPdf(java.lang.String pdfFileName,
                           boolean noMarginPdf,
                           boolean isSimPrintMode,
                           int isCompressImage,
                           boolean isGifTrans)
Exports the current report to a PDF file, which will be saved at client side.

Parameters:
pdfFileName - the name of the PDF file.
noMarginPdf - indicates to generate the pdf file without page margin.
isSimPrintMode - If true, generate charts and barcodes using vector graphics. If false, generate charts and barcodes using images. The recommended value is false.
isCompressImage - indicates whether to compress the images in the pdf file.
isGifTrans - indicates whether the gif is transparent or not.
Returns:
true if exported successfully.

exportToPdf

public boolean exportToPdf(java.lang.String pdfFileName,
                           boolean noMarginPdf,
                           boolean isSimPrintMode,
                           int isCompressImage,
                           boolean isGifTrans,
                           boolean isToc,
                           boolean isDrilldown)
Exports the current report to a PDF file, which will be saved at client side.

Parameters:
pdfFileName - the name of the PDF file.
noMarginPdf - indicates to generate the pdf file without page margin.
isSimPrintMode - If true, generate charts and barcodes using vector graphics. If false, generate charts and barcodes using images. The recommended value is false.
isCompressImage - indicates whether to compress the images in the pdf file.
isGifTrans - indicates whether the gif is transparent or not.
isToc - indicates the pdf file has TOC.
isDrilldown - indicates whether to enable drilldown in the pdf file.
Returns:
true if exported successfully.

exportToPdf

public boolean exportToPdf(java.lang.String pdfFileName,
                           boolean noMarginPdf,
                           boolean isSimPrintMode,
                           int isCompressImage,
                           boolean isGifTrans,
                           boolean isToc,
                           boolean isDrilldown,
                           java.lang.String pdfPassword)
Exports the current report to a PDF file, which will be saved at client side.

Parameters:
pdfFileName - the name of the PDF file.
noMarginPdf - indicates to generate the pdf file without page margin.
isSimPrintMode - If true, generate charts and barcodes using vector graphics. If false, generate charts and barcodes using images. The recommended value is false.
isCompressImage - indicates whether to compress the images in the pdf file.
isGifTrans - indicates whether the gif is transparent or not.
isToc - indicates the pdf file has TOC.
isDrilldown - indicates whether to enable drilldown in the pdf file.
pdfPassword - indicates the value of password
Returns:
true if exported successfully.

exportToText

public boolean exportToText(java.lang.String txtFileName,
                            boolean isNormalText,
                            boolean isRepeat,
                            char delimiter)
Exports the current report to a TEXT file, which will be saved at client side.

Parameters:
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 in which each row represents each record in the report. It can be used as a text data source to exchange data with other applications.

isRepeat - indicates whether to repeat the same contents.
delimiter - the delimiter used in the SDF (Standard Data Format) format
Returns:
true if exported successfully.

exportToText

public boolean exportToText(java.lang.String txtFileName,
                            boolean isNormalText,
                            boolean isRepeat,
                            char delimiter,
                            int charWidth,
                            int charHeight)
Exports the current report to a TEXT file, which will be saved at client side.

Parameters:
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 in which each row represents each record in the report. It can be used as a text data source to exchange data with other applications.

isRepeat - indicates whether to repeat the same contents.
delimiter - the delimiter used in the SDF (Standard Data Format) format.
charWidth - the width for each unit of the width clearance between columns.
charHeight - the height for each unit of the height clearance between columns.
Returns:
true if exported successfully.

exportToText

public boolean exportToText(java.lang.String txtFileName,
                            boolean isNormalText,
                            boolean isRepeat,
                            char delimiter,
                            int charWidth,
                            int charHeight,
                            boolean isQuoteMark)
Exports the current report to a TEXT file, which will be saved at client side.

Parameters:
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 in which each row represents each record in the report. It can be used as a text data source to exchange data with other applications.

isRepeat - indicates whether to repeat the same contents.
delimiter - the delimiter used in the SDF (Standard Data Format) format.
charWidth - the width for each unit of the width clearance between columns.
charHeight - the height for each unit of the height clearance between columns.
isQuoteMark - keeps the quote character in standard format text
Returns:
true if exported successfully.

exportToText

public boolean exportToText(java.lang.String txtFileName,
                            boolean isNormalText,
                            boolean isRepeat,
                            char delimiter,
                            int charWidth,
                            int charHeight,
                            boolean isQuoteMark,
                            boolean hasHeadfoot,
                            boolean bTxtCompress)
Exports the current report to a TEXT file, which will be saved at client side.

Parameters:
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 in which each row represents each record in the report. It can be used as a text data source to exchange data with other applications.

isRepeat - indicates whether to repeat the same contents.
delimiter - the delimiter used in the SDF (Standard Data Format) format.
charWidth - the width for each unit of the width clearance between columns.
charHeight - the height for each unit of the height clearance between columns.
isQuoteMark - keeps the quote character in standard format text
hasHeadfoot - whether to include Header and footer in the SDF format.
bTxtCompress - compresses the file
Returns:
true if exported successfully.

exportToText

public boolean exportToText(java.lang.String txtFileName,
                            boolean isNormalText,
                            boolean isRepeat,
                            char delimiter,
                            int charWidth,
                            int charHeight,
                            boolean isQuoteMark,
                            boolean hasHeadfoot,
                            boolean bTxtCompress,
                            boolean forWindows)
Exports the current report to a TEXT file, which will be saved at client side.

Parameters:
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 in which each row represents each record in the report. It can be used as a text data source to exchange data with other applications.

isRepeat - indicates whether to repeat the same contents.
delimiter - the delimiter used in the SDF (Standard Data Format) format.
charWidth - the width for each unit of the width clearance between columns.
charHeight - the height for each unit of the height clearance between columns.
isQuoteMark - keeps the quote character in standard format text
hasHeadfoot - whether to include Header and footer in the SDF format.
bTxtCompress - compresses the file
forWindows - the text file has \r\n format carriage return.
Returns:
true if exported successfully.

exportToText

public boolean exportToText(java.lang.String txtFileName,
                            boolean isNormalText,
                            boolean isRepeat,
                            char delimiter,
                            int charWidth,
                            int charHeight,
                            boolean isQuoteMark,
                            boolean hasHeadfoot,
                            boolean bTxtCompress,
                            boolean forWindows,
                            boolean isCsv,
                            boolean isTab)
Exports the current report to a TEXT file, which will be saved at client side.

Parameters:
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 in which each row represents each record in the report. It can be used as a text data source to exchange data with other applications.

isRepeat - indicates whether to repeat the same contents.
delimiter - the delimiter used in the SDF (Standard Data Format) format.
charWidth - the width for each unit of the width clearance between columns.
charHeight - the height for each unit of the height clearance between columns.
isQuoteMark - keeps the quote character in standard format text
hasHeadfoot - whether to include Header and footer in the SDF format.
bTxtCompress - compresses the file
forWindows - the text file has \r\n format carriage return.
isCsv - csv format
isTab - tab delimited
Returns:
true if exported successfully.

exportToRtf

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

Parameters:
rtfFileName - the Rtf file name.
Returns:
true if exported successfully.

exportToRtf

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

Parameters:
rtfFileName - the Rtf file name.
noMarginRtf - indicates to generate the Rtf file without page margin.
Returns:
true if exported successfully.

exportToXML

public boolean exportToXML(java.lang.String xmlFileName)
Exports the current report to XML, which will be saved at client side.

Parameters:
xmlFileName - the XML file name.
Returns:
true if exported successfully.

exportToXML

public boolean exportToXML(java.lang.String xmlFileName,
                           boolean isMultiFiles,
                           boolean isOnlyData)
Deprecated. As of JREntViewer version 5.1,

Exports the current report to XML, which will be saved at client side. The result of xml is saved in a .xml file.

Parameters:
xmlFileName - the XML file name.
isMultiFiles - indicates whether XML is generated to a file or to multiple files (To XML).
isOnlyData - indicates that only database column information is exported to the XML file, otherwise all report details including all the properties will be exported.
Returns:
true if exported successfully.

exportToXML

public boolean exportToXML(java.lang.String xmlFileName,
                           boolean isOnlyData)
Exports the current report to XML, which will be saved at client side. 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.
Returns:
true if exported successfully.

exportToXML

public boolean exportToXML(java.lang.String xmlFileName,
                           boolean isOnlyData,
                           java.lang.String xsdFile)
Exports the current report to XML, which will be saved at client side. 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.
xsdFile - indicates the xsd file path.
Returns:
true if exported successfully.

exportToXls

public boolean exportToXls(java.lang.String xlsFileName)
Exports the current report to BIFF (Binary File Format), which will be saved at client side. The result of BIFF is saved in a .xls file. This file can be opened by Microsoft Excel.

Parameters:
xlsFileName - the Xls file name.
Returns:
true if exported successfully.

exportToXls

public boolean exportToXls(java.lang.String xlsFileName,
                           boolean excelLayout)
Exports the current report to BIFF(Binary File Format), which will be saved at client side. The result of BIFF is saved in a .xls file. This file can be opened by Microsoft Excel.

Parameters:
xlsFileName - the Xls file name.
excelLayout - whether the Xls file preserves report formatting.
Returns:
true if exported successfully.

exportToXls

public boolean exportToXls(java.lang.String xlsFileName,
                           int wordWrap)
Exports the current report to BIFF (Binary File Format), which will be saved at client side. The result of BIFF is saved in a .xls file. This file can be opened by Microsoft Excel.

Parameters:
xlsFileName - the Xls file name.
wordWrap - the Xls file has word wrap.
Returns:
true if exported successfully.

exportToXls

public boolean exportToXls(java.lang.String xlsFileName,
                           int wordWrap,
                           boolean excel2000)
Exports the current report to BIFF (Binary File Format), which will be saved at client side. The result of BIFF is saved in a .xls file. This file can be opened by Microsoft Excel.

Parameters:
xlsFileName - the Xls file name.
wordWrap - the Xls file has word wrap.
excel2000 - the Xls file has excel2000 format.
Returns:
true if exported successfully.

exportToXls

public boolean exportToXls(java.lang.String xlsFileName,
                           int wordWrap,
                           boolean excel2000,
                           boolean hasShapes)
Exports the current report to BIFF (Binary File Format), which will be saved at client side. The result of BIFF is saved in a .xls file. This file can be opened by Microsoft Excel.

Parameters:
xlsFileName - the Xls file name.
wordWrap - the Xls file has word wrap.
excel2000 - the Xls file has excel2000 format.
hasShapes - the Xls file has shapes.
Returns:
true if exported successfully.

exportToXls

public boolean exportToXls(java.lang.String xlsFileName,
                           int wordWrap,
                           boolean excel2000,
                           boolean hasShapes,
                           boolean excelLayout)
Exports the current report to BIFF (Binary File Format), which will be saved at client side. The result of BIFF is saved in a .xls file. This file can be opened by Microsoft Excel.

Parameters:
xlsFileName - the Xls file name.
wordWrap - the Xls file has word wrap.
excel2000 - the Xls file has excel2000 format.
hasShapes - the Xls file has shapes.
excelLayout - whether the Xls file preserves report formatting.
Returns:
true if exported successfully.

exportToPS

public boolean exportToPS(java.lang.String psFileName)
Exports the current report to a PS (PostScript) file, which will be saved at client side.

Parameters:
psFileName - the PS file name.
Returns:
true if exported successfully.

exportToPS

public boolean exportToPS(java.lang.String psFileName,
                          boolean noMarginPs)
Exports the current report to a PS (PostScript) file, which will be saved at client side.

Parameters:
psFileName - the PS file name.
noMarginPs - indicates to generate the PS file without page margin.
Returns:
true if exported successfully.

exit

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


logout

public void logout()
Enables to log out from JReport Server.


getStatus

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


getCurrentPageNumber

public int getCurrentPageNumber()
Gets the current page number of the report.

Returns:
the current page number. If no report loaded, -1 will be returned.

getTotalPageNumber

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

Returns:
the total page number of the report. If no report loaded, -1 will be returned.

gotoPage

public int gotoPage(int pageNumber)
Enables to go to the specified page of the report.

Parameters:
pageNumber - the specified page number.
Returns:
this page number. If no report loaded, -1 will be returned.

firstPage

public java.lang.String firstPage()
Enables to go to the first page of report.

Returns:
a String, "Ok" means you have successfully gone to the first page, "No report load" means no report is loaded in and "No More page" means the current page is already the first page.

prevPage

public java.lang.String prevPage()
Enables to go to the previous page of the report.

Returns:
a String, "Ok" means you have successfully gone to the previous page, "No report load" means no report is loaded in and "No More page" means the current page is already the first page.

nextPage

public java.lang.String nextPage()
Enables to go to the next page of the report.

Returns:
a String, "Ok" means you have successfully gone to the next page, "No report load" means no report is loaded in and "No More page" means the current page is already the last page.

lastPage

public java.lang.String lastPage()
Enables to go to the last page of the report.

Returns:
a String, "Ok" means you have successfully gone to the last page, "No report load" means no report is loaded in and "No More page" means the current page is already the last page.

setShowInfoLevel

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

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

setLogFile

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

Parameters:
fileName - the log file name
Returns:
true if successful.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

setConnection

public 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.

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.

setConnection

public void setConnection(java.lang.String strURL,
                          java.lang.String strUID,
                          java.lang.String strPSWD,
                          java.lang.String strJdbcDriver,
                          boolean jdbcGetSupportInfo)
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.
jdbcGetSupportInfo - whether re-get the JDBC support info for the new JDBC setting. Default value is "false".

zoom

public void zoom(int zoomRatio)
Zooms the report.


setSSL

public void setSSL(boolean SSL)
Sets the connection to use SSL or not.

Parameters:
SSL - boolean, indicates whether to use SSL connection.

getSSL

public boolean getSSL()
Gets current SSL state.

Returns:
boolean, indicates the current SSL state.