jet.bean
Class JRResultViewer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by jet.bean.JRResultViewer
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 JRResultViewer
extends javax.swing.JPanel
implements java.awt.event.AdjustmentListener, JReportPrintListener, java.io.Externalizable, java.awt.event.ActionListener

for viewing the rst file and some exporting to file functions

Some functions have been moved to JRSetResultViewer since JReport V8

.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
static int IE
          Indicates that the html browser is IE.
static int LANDSCAPE
          The origin is at the bottom left of the paper with x running from bottom to top and y running from left to right.
static int NETSCAPE
          Indicates that the html browser is NETSCAPE.
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
          Specifies to open the debug.
static int vError
          Specifies to open the error.
static int vOff
          Specifies to close the debug.
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
JRResultViewer()
          The default constructor.
JRResultViewer(boolean showButton)
          The constructor.
 
Method Summary
 void addClickActionListener(jet.thinviewer.ClickActionListener clickActionListener)
          Adds the click action listener.
 void closeLog()
          closes the log stream.
 void exit()
          If you want to quit from JReport Viewer Bean, you should call this method.
 boolean exportToDhtml(java.lang.String htmlFileName)
          Exports result report file(with the .rst extension)to a DHTML file.
 boolean exportToDhtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser)
          Exports result report file(with the .rst extension)to a DHTML file.
 boolean exportToDhtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser, boolean bincdrilldownfile)
          Exports the report result file(with the .rst extension)to a DHTML file.
 boolean exportToDhtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser, boolean bincdrilldownfile, boolean noMargin)
          Exports the report result file(with the .rst extension)to a DHTML file.
 boolean exportToDhtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser, boolean bincdrilldownfile, boolean noMargin, int resolution)
          Exports the report result file(with the .rst extension)to a DHTML file.
 boolean exportToDhtml(java.lang.String rstFileName, java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser, boolean bincdrilldownfile, boolean noMargin)
          Exports the report result file(with the .rst extension)to a DHTML file.
 boolean exportToHtml(java.lang.String htmlFileName)
          Deprecated. please use the method exportToHtml(String, HtmlParameter)
 boolean exportToHtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser)
          Deprecated. please use the method exportToHtml(String, HtmlParameter)
 boolean exportToHtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser, boolean bincdrilldownfile)
          Deprecated. please use the method exportToHtml(String, HtmlParameter)
 boolean exportToHtml(java.lang.String htmlFileName, HtmlParameter htmlParameter)
          Exports the current report to html file with the HtmlParameter.
 boolean exportToHtml(java.lang.String rstFileName, java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser, boolean bincdrilldownfile, boolean noMargin)
          Exports the report result file(with the .rst extension)to an HTML file.
 boolean exportToHtml(java.lang.String rstFileName, java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser, boolean bincdrilldownfile, boolean noMargin, int resolution)
          Exports the report result file(with the .rst extension)to an HTML file.
 boolean exportToPdf(java.lang.String pdfFileName)
          Deprecated. please the method exportToPdf(String, PDFParameter)
 boolean exportToPdf(java.lang.String pdfFileName, boolean noMargin)
          Deprecated. please the method exportToPdf(String, PDFParameter)
 boolean exportToPdf(java.lang.String pdfFileName, boolean noMargin, boolean isSimPrintMode)
          Deprecated. please the method exportToPdf(String, PDFParameter)
 boolean exportToPdf(java.lang.String pdfFileName, boolean noMargin, boolean isSimPrintMode, boolean isCompressImage)
          Deprecated. please the method exportToPdf(String, PDFParameter)
 boolean exportToPdf(java.lang.String pdfFileName, boolean noMargin, boolean isSimPrintMode, int isCompressImage, boolean isTransparent)
          Deprecated. please the method exportToPdf(String, PDFParameter)
 boolean exportToPdf(java.lang.String pdfFileName, boolean noMargin, boolean isSimPrintMode, int isCompressImage, boolean isTransparent, boolean bToc, boolean bDrill)
          Deprecated. please the method exportToPdf(String, PDFParameter)
 boolean exportToPdf(java.lang.String pdfFileName, boolean noMargin, boolean isSimPrintMode, int isCompressImage, boolean isTransparent, boolean bToc, boolean bDrill, java.lang.String password)
          Deprecated. please the method exportToPdf(String, PDFParameter)
 boolean exportToPdf(java.lang.String fileName, PDFParameter parameter)
          Exports the current report to a pdf file with PDFParameter.
 boolean exportToPS(java.lang.String psFileName)
          Deprecated. please use the method exportToPS(String, PSParameter)
 boolean exportToPS(java.lang.String psFileName, boolean noMargin)
          Deprecated. please use the method exportToPS(String, PSParameter)
 boolean exportToPS(java.lang.String psFileName, PSParameter psParameter)
          Exports the current report to ps file with the PSParameter.
 boolean exportToRtf(java.lang.String rtfFileName)
          Deprecated. please use the method exportToPS(String, PSParameter)
 boolean exportToRtf(java.lang.String rtfFileName, boolean noMargin)
          Deprecated. please use the method exportToPS(String, PSParameter)
 boolean exportToRtf(java.lang.String rtfFileName, RtfParameter rtfParameter)
          Exports the current report to rtf file with the RtfParameter.
 boolean exportToText(java.lang.String textFileName, boolean isNormalText)
          Deprecated. please use the method exportToText(String, TextParameter)
 boolean exportToText(java.lang.String textFileName, boolean isNormalText, boolean isRepeat, char delimiter)
          Deprecated. please use the method exportToText(String, TextParameter)
 boolean exportToText(java.lang.String textFileName, boolean isNormalText, boolean isRepeat, char delimiter, boolean compress)
          Deprecated. please use the method exportToText(String, TextParameter)
 boolean exportToText(java.lang.String textFileName, boolean isNormalText, boolean isRepeat, char delimiter, boolean compress, boolean quoteMark)
          Deprecated. please use the method exportToText(String, TextParameter)
 boolean exportToText(java.lang.String textFileName, boolean isNormalText, boolean isRepeat, char delimiter, int udchWidth, int udchHeight, boolean compress, int resolution, boolean quoteMark, boolean hasHeadfoot)
          Deprecated. please use the method exportToText(String, TextParameter)
 boolean exportToText(java.lang.String textFileName, boolean isNormalText, boolean isRepeat, char delimiter, int udchWidth, int udchHeight, boolean compress, int resolution, boolean quoteMark, boolean hasHeadfoot, boolean forWindows)
          Deprecated. please use the method exportToText(String, TextParameter)
 boolean exportToText(java.lang.String textFileName, boolean isNormalText, boolean isRepeat, char delimiter, int udchWidth, int udchHeight, boolean compress, int resolution, boolean quoteMark, boolean hasHeadfoot, boolean forWindows, boolean ignoreDelimiter)
          Deprecated. please use the method exportToText(String, TextParameter)
 boolean exportToText(java.lang.String textFileName, boolean isNormalText, int udchWidth, int udchHeight)
          Deprecated. please use the method exportToText(String, TextParameter)
 boolean exportToText(java.lang.String textFileName, boolean isNormalText, int udchWidth, int udchHeight, boolean compress, int resolution)
          Deprecated. please use the method exportToText(String, TextParameter)
 boolean exportToText(java.lang.String textFileName, boolean isNormalText, int udchWidth, int udchHeight, boolean compress, int resolution, boolean quoteMark)
          Deprecated. please use the method exportToText(String, TextParameter)
 boolean exportToText(java.lang.String textFileName, TextParameter textParameter)
          Exports to text file with the TextParameter.
 boolean exportToXls(java.lang.String xlsFileName)
          Deprecated. please use the method exportToXls(String, ExcelParameter)
 boolean exportToXls(java.lang.String xlsFileName, ExcelParameter excelParameter)
          Exports to excel with the ExcelParameter.
 boolean exportToXls(java.lang.String xlsFileName, int isWordWrap)
          Deprecated. please use the method exportToXls(String, ExcelParameter).
 boolean exportToXls(java.lang.String xlsFileName, int isWordWrap, boolean isBiff8)
          Deprecated. please use the method exportToXls(String, ExcelParameter)
 boolean exportToXls(java.lang.String xlsFileName, int isWordWrap, boolean isBiff8, int param)
          Deprecated. please use the method exportToXls(String, ExcelParameter)
 boolean exportToXML(java.lang.String xmlFileName, boolean isDataOnly)
          Deprecated. please use exportToXML(String, boolean, String)
 boolean exportToXML(java.lang.String xmlFileName, boolean isMutibleFile, boolean isDataOnly)
          Deprecated. replaced by exportToXML(String, boolean, String)
 boolean exportToXML(java.lang.String xmlFileName, boolean isDataOnly, java.lang.String xsdFile)
          Exports the current report to XML, the result of which is saved as a .xml file.
 java.lang.String firstPage()
          Enables users to go to the first page of the report.
 java.util.Vector getAllHtmlFile()
          Returns all html files that are generated by exportToHtml.
static java.util.Vector getAllPrinters()
          Gets all the printers in system.
 java.util.Vector getAllRtfFile()
          Gets all the result files after exporting to rtf.
 java.util.Vector getAllXlsFile()
          Gets all the result files after exporting to excel.
 java.util.Vector getAllXMLFile()
          Gets all the result files after exporting to xml.
 int getCurrentPageNumber()
          Gets the current page number of the report.
 java.lang.String getLoadReport()
           
 java.awt.Dimension getMinimumSize()
          Gets the minimum size, which means its width and high are both 0.
 int getPageOrientation()
          Gets the page orientation.
 java.awt.Dimension getPreferredSize()
           
 java.lang.String getPrintStatus()
          Gets the print status after printing.
 java.lang.String getReportName()
          Deprecated. from JReport V8, maybe return the value("")
 boolean getScrollbars()
          Tells user there are scrollbars or not.
 java.lang.String getStatus()
          Gets the status after an action.
 java.lang.String getTempPath()
          Gets the temporary path.
 int getTotalPageNumber()
          Gets the total page number of the report.
 int gotoPage(int pageNumber)
          Enables users to go to the specified page of the report.
 boolean hasScrollbars()
          Tells user there are scrollbars or not.
 boolean isShowButton()
          Returns the status whether to show the buttons to turn page.
 boolean isZipStream(java.io.InputStream ins)
          Judges whether user stream is compressed or not.
 java.lang.String lastPage()
          Enables users to go to the last page of the report.
 java.lang.String nextPage()
          Enables users to go to the next page of the report.
 java.lang.String prevPage()
          Enables users to go to the previous page of the report.
 void printReport()
          Prints the report with the Interactive format, not with In backGround format.
 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)
           
 void printReport(java.lang.Object printJob, java.lang.Object pageFormat, boolean bInteractive, boolean bInBackground, boolean bUseJDK11, boolean bSeparateLargePage, java.lang.String jobName)
           
 void printReport(java.lang.Object printJob, java.lang.Object pageFormat, boolean bInteractive, boolean bInBackground, boolean bUseJDK11, boolean bSeparateLargePage, java.lang.String jobName, java.lang.String printer)
          Prints the report with 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 runReport()
          Launches to run JReport Result Viewer Bean.
 java.lang.String saveAs()
          Saves this report as a new result file.
 void setCommunicator(Communicator communicator)
          Sets the communicator, which is a class defined by JReport.
 void setHomePath(java.lang.String homepath)
          Sets home path.
 void setHtmlImageType(int imageType)
           
 void setInputStream(java.io.InputStream ins, boolean zip)
          Sets the user input stream.
 void setLoadReport(java.lang.String loadReport)
          Enables/disables to run the report.
 boolean setLogFile(java.lang.String fileName)
          Sets the log file.
 void setPrintStatus()
          Sets the print status before printing, which is used in printing background.
 void setReportName(java.lang.String reportName)
          Sets the report name.
 void setScrollbars(boolean b)
          Allows user to set scrollbars.
 void setShowButton(boolean bShowButton)
          Sets the status whether to show the page turning buttons or not.
 void setShowInfoLevel(int level)
          Enables/disables output error and debug message.
 void setTempPath(java.lang.String sTempPath)
          Sets the temporary path.
 void zoom(int zoomRatio)
          Zooms the report.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.event.AdjustmentListener
adjustmentValueChanged
 
Methods inherited from interface jet.export.print.JReportPrintListener
printEnd, printStart
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 

Field Detail

vOff

public static final int vOff
Specifies to close the debug.

See Also:
Constant Field Values

vDebug

public static final int vDebug
Specifies to open the debug.

See Also:
Constant Field Values

vError

public static final int vError
Specifies to open the error.

See Also:
Constant Field Values

LANDSCAPE

public static final int LANDSCAPE
The origin is at the bottom left of the paper with x running from bottom to top and y running from 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 that the html browser is IE.

See Also:
Constant Field Values

NETSCAPE

public static final int NETSCAPE
Indicates that the html browser is NETSCAPE.

See Also:
Constant Field Values
Constructor Detail

JRResultViewer

public JRResultViewer()
The default constructor.


JRResultViewer

public JRResultViewer(boolean showButton)
The constructor.

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

setInputStream

public void setInputStream(java.io.InputStream ins,
                           boolean zip)
Sets the user input stream.

Parameters:
ins - the user input stream.
zip - whether the result stream is compressed or not.
See Also:
isZipStream(InputStream)

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.


getReportName

public java.lang.String getReportName()
Deprecated. from JReport V8, maybe return the value("")

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.

getPageOrientation

public int getPageOrientation()
Gets the page orientation.

Returns:
the page orientation format, -1 specifies to produce error when getting the page orientation format
See Also:
LANDSCAPE, PORTRAIT

setCommunicator

public void setCommunicator(Communicator communicator)
Sets the communicator, which is a class defined by JReport. After user sets the communicator, the report viewer will load report from this communicator, not from the result file---rst.

Parameters:
communicator - the communicator.
See Also:
JREngine.getReportCommunicator()

isShowButton

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

Returns:
true show the buttons and disabled when it is false

setShowButton

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


getLoadReport

public java.lang.String getLoadReport()
Returns:
See Also:
setLoadReport(String)

setLoadReport

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

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

printReport

public void printReport()
Prints the report with the Interactive format, not with In backGround format.


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. The JDK 1.2 method can return you with a 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)
See Also:
printReport(Object, Object, boolean, boolean, boolean, boolean, String)

printReport

public void printReport(java.lang.Object printJob,
                        java.lang.Object pageFormat,
                        boolean bInteractive,
                        boolean bInBackground,
                        boolean bUseJDK11,
                        boolean bSeparateLargePage,
                        java.lang.String jobName)
See Also:
printReport(Object, Object, boolean, boolean, boolean, boolean, String, String)

printReport

public void printReport(java.lang.Object printJob,
                        java.lang.Object pageFormat,
                        boolean bInteractive,
                        boolean bInBackground,
                        boolean bUseJDK11,
                        boolean bSeparateLargePage,
                        java.lang.String jobName,
                        java.lang.String printer)
Prints the report with 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. The JDK 1.2 method can return you with a 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 printing page size you choose is smaller than the report page size, then the report will be printed as multiple pages serially, which means we will seperate the large pages of the report automatically. As for JDK1.2 or higher versions, if you set the parameter to true, the page format dialog will pop up. In this dialog, you can choose the page format you want to print with, and JReport 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, and then choose Page Format).
jobName - the print job name
printer - the printer

Note: This printing mothod is not recommended, as 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, JReport will create a PrinterJob or PrintJob for your task. A PrintJob object will be needed in JDK1.1 print method, or as for JDK1.2,JDK1.4 print method, a PrinterJob object will be needed. If you pass a print job which is not a null value and set the parameter bInteractive as true, information taken by printerjob would be reset by the values from the print set up dialog such as Copies,PrintService,JobName.
bInteractive - a boolean value, if you set it to true, JReport will 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 a instance of PageFormat class, which describes the size and orientation of the page to be printed. The pageFormat will take effect only with JDK1.1 or JDK1.2. We recommend that you use attribute Info vector instead of the printFormat object with JDK1.4.
bInBackground - a boolean value, if you set it to false, the printing progress dialog will show up with the printing progress bar in it.
jreportprintlistener - is the listener of print. It is a interface which contains two methods which are printStart() and printEnd(). JeportPrintListener is located in jet.thinview.print package. This interface is useful. It helps you to get the printing status -- start or end, for example. Otherwise, you can set it to null.
useJDK - a int value, if you set it to 0, it will use JDK1.1 to print the report. Otherwise 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. The JDK 1.2 method can return you with a satisfactory result even for a gif file, but it is slow in speed. JDK 1.4 provides more options to do printing, for example, to specify tray.
jobName - specifies print job name.
attributeInfo - is a vector whose elements are string. Each String has 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 versions only -- a lot of features are only supported by jdk 1.4 or above versions. 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, a print setup dialog will be presented 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 a interface which contains two methods: printStart() and printEnd(). This interface is useful. It helps you to get the print status -- start or end, for example. Otherwise, you can set it to null.
jobName - specifies the print job name.
attributeInfo - is a vector whose elements are string. Each String has 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 instance 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 the 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 has not such a tray, it would throw a NoSuchPrintAttributeException. 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 as showed 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 - specify 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 versions. 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 - if these parameters in attributeInfo or customMedias are not supported, or if the JDK version is under JDK 1.4.0.
Since:
version 7.x SP2, version 8.0
See Also:
PrintConfig, CustomMediaCopies, CustomMediaMargin, CustomMediaTray, CustomJobPriority, CustomMediaPaper, CustomPageRanges, CustomToFile, CustomUserName, CustomJobName

getAllPrinters

public static java.util.Vector getAllPrinters()
Gets all the printers in system. Can do this only in JDK14 and advance JDK version.

Returns:
Vector that hold the system printers. Note, if the JDK version is under JDK1.4, it can not get the system printers.

getPrintStatus

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

Returns:
the print status

setPrintStatus

public void setPrintStatus()
Sets the print status before printing, which is used in printing background.


getMinimumSize

public java.awt.Dimension getMinimumSize()
Gets the minimum size, which means its width and high are both 0.

Overrides:
getMinimumSize in class javax.swing.JComponent
Returns:

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class javax.swing.JComponent

runReport

public void runReport()
Launches to run JReport Result Viewer Bean. first use the communicator in this object, if it exists second


exportToHtml

public boolean exportToHtml(java.lang.String htmlFileName)
Deprecated. please use the method exportToHtml(String, HtmlParameter)

Exports the current report to HTML.

Parameters:
htmlFileName - the HTML file name.
Returns:
true if exported successfully.
See Also:
exportToHtml(String, HtmlParameter)

exportToHtml

public boolean exportToHtml(java.lang.String htmlFileName,
                            boolean bChartApplet,
                            boolean isMultiFile,
                            boolean bUsingTable,
                            boolean bHyperlink,
                            boolean bPageNum,
                            boolean bAbsolute,
                            int iBrowser)
Deprecated. please use the method exportToHtml(String, HtmlParameter)

Exports report result file(with the .rst extension)to an HTML file.

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.
bPageNum - indicates whether to generate page numbers.
bAbsolute - indicates the whether the font size is absolute or relative.
iBrowser - indicates whether the browser is IE or NETSCAPE. The value of parameter int browser must be IE or NETSCAPE.
Returns:
true if exported successfully.
See Also:
exportToHtml(String, HtmlParameter)

exportToHtml

public boolean exportToHtml(java.lang.String htmlFileName,
                            boolean bChartApplet,
                            boolean isMultiFile,
                            boolean bUsingTable,
                            boolean bHyperlink,
                            boolean bPageNum,
                            boolean bAbsolute,
                            int iBrowser,
                            boolean bincdrilldownfile)
Deprecated. please use the method exportToHtml(String, HtmlParameter)

Exports the current report to HTML.

Parameters:
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet.
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.
bPageNum - indicates whether to generate page numbers.
bAbsolute - indicates whether the font size is absolute or relative.
iBrowser - indicates whether the browser is IE or NETSCAPE. The value of parameter int browser must be IE or NETSCAPE.
bincdrilldownfile - indicates the drilldown html files were included in file list
Returns:
true if exported successfully.
See Also:
exportToHtml(String, HtmlParameter)

exportToHtml

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

Parameters:
rstFileName - the result file name.
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet.
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.
bPageNum - indicates whether to generate page numbers.
bAbsolute - indicates whether the font size is absolute or relative.
iBrowser - indicates whether the browser is IE or NETSCAPE. The value of parameter int browser must be IE or NETSCAPE.
bincdrilldownfile - specifies to generate the drilldown html files in the file list.
noMargin - specifies to generate the html files without page margin.
Returns:
true if exported successfully.
See Also:
exportToHtml(String, String, boolean, boolean, boolean, boolean, boolean, boolean, int, boolean, boolean, int)

exportToHtml

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

Parameters:
rstFileName - the result file name.
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet.
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.
bPageNum - indicates whether to generate page numbers.
bAbsolute - indicates whether the font size is absolute or relative.
iBrowser - indicates whether the browser is IE or NETSCAPE. The value of parameter int browser must be IE or NETSCAPE.
bincdrilldownfile - specifies to generate the drilldown html files in the file list.
noMargin - specifies to generate the html files without page margin.
resolution - indicates the resolution of the html files
Returns:
true if exported successfully.

setHtmlImageType

public void setHtmlImageType(int imageType)
Parameters:
imageType -

exportToHtml

public boolean exportToHtml(java.lang.String htmlFileName,
                            HtmlParameter htmlParameter)
Exports the current report to html file with the HtmlParameter.

Parameters:
htmlFileName -
htmlParameter -
Returns:
true if exported successfully.

getAllHtmlFile

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


exportToDhtml

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

Parameters:
rstFileName - the result file name.
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet.
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.
bPageNum - indicates whether to generate page numbers.
bAbsolute - indicates whether the font size is absolute or relative.
iBrowser - indicates whether the browser is IE or NETSCAPE. The value of parameter int browser must be IE or NETSCAPE.
bincdrilldownfile - specifies to generate the drilldown html files in the file list.
noMargin - specifies to generate the html files without page Margin.
Returns:
true if exported successfully.

exportToDhtml

public boolean exportToDhtml(java.lang.String htmlFileName)
Exports result report file(with the .rst extension)to a DHTML file.

Parameters:
htmlFileName - the HTML file name.
Returns:
true if exported successfully.
See Also:
exportToDhtml(String, boolean, boolean, boolean, boolean, boolean, boolean, int)

exportToDhtml

public boolean exportToDhtml(java.lang.String htmlFileName,
                             boolean bChartApplet,
                             boolean isMultiFile,
                             boolean bUsingTable,
                             boolean bHyperlink,
                             boolean bPageNum,
                             boolean bAbsolute,
                             int iBrowser)
Exports result report file(with the .rst extension)to a DHTML file.

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.
bPageNum - indicates whether to generate page numbers.
bAbsolute - indicates whether the font size is absolute or relative.
iBrowser - indicates whether the browser is IE or NETSCAPE. The value of parameter int browser must be IE or NETSCAPE.
Returns:
true if exported successfully.

exportToDhtml

public boolean exportToDhtml(java.lang.String htmlFileName,
                             boolean bChartApplet,
                             boolean isMultiFile,
                             boolean bUsingTable,
                             boolean bHyperlink,
                             boolean bPageNum,
                             boolean bAbsolute,
                             int iBrowser,
                             boolean bincdrilldownfile)
Exports the report result file(with the .rst extension)to a DHTML file.

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.
bPageNum - indicates whether to generate page numbers.
bAbsolute - indicates whether the font size is absolute or relative.
iBrowser - indicates whether the browser is IE or NETSCAPE. The value of parameter int browser must be IE or NETSCAPE.
bincdrilldownfile - indicates that the drilldown html files were included in file list.
Returns:
true if exported successfully.

exportToDhtml

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

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.
bPageNum - indicates whether to generate page numbers.
bAbsolute - indicates whether the font size is absolute or relative.
iBrowser - indicates whether the browser is IE or NETSCAPE. The value of the parameter iBrowser must be
IE
or
NETSCAPE
.
bincdrilldownfile - indicates that the drilldown html files were included in file list
noMargin - 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 bPageNum,
                             boolean bAbsolute,
                             int iBrowser,
                             boolean bincdrilldownfile,
                             boolean noMargin,
                             int resolution)
Exports the report result file(with the .rst extension)to a DHTML file.

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.
bPageNum - indicates whether to generate page numbers.
bAbsolute - indicates whether the font size is absolute or relative.
iBrowser - indicates whether the browser is IE or NETSCAPE. The value of the parameter iBrowser must be
IE
or
NETSCAPE
.
bincdrilldownfile - indicates that the drilldown html files were included in file list.
noMargin - specifies to generate the html files without page margin.
resolution - indicates the resolution of the html files.
Returns:
true if exported successfully.

exportToPdf

public boolean exportToPdf(java.lang.String pdfFileName)
Deprecated. please the method exportToPdf(String, PDFParameter)

Exports the current report to a PDF file.

Parameters:
pdfFileName - the name of the PDF file.
Returns:
true if exported successfully.
See Also:
exportToPdf(String, PDFParameter)

exportToPdf

public boolean exportToPdf(java.lang.String pdfFileName,
                           boolean noMargin)
Deprecated. please the method exportToPdf(String, PDFParameter)

Exports the current report to a PDF file.

Parameters:
pdfFileName - the name of the PDF file.
noMargin - specifies to generate the pdf file without page margin.
Returns:
true if exported successfully.
See Also:
exportToPdf(String, PDFParameter)

exportToPdf

public boolean exportToPdf(java.lang.String pdfFileName,
                           boolean noMargin,
                           boolean isSimPrintMode)
Deprecated. please the method exportToPdf(String, PDFParameter)

Exports the current report to a PDF file.

Parameters:
pdfFileName - the name of the PDF file.
noMargin - specifies to generate the pdf file without page margin.
isSimPrintMode - specifies to generate the pdf file using the simulated print mode.
Returns:
true if exported successfully.
See Also:
exportToPdf(String, PDFParameter)

exportToPdf

public boolean exportToPdf(java.lang.String pdfFileName,
                           boolean noMargin,
                           boolean isSimPrintMode,
                           boolean isCompressImage)
Deprecated. please the method exportToPdf(String, PDFParameter)

Exports the current report to a PDF file.

Parameters:
pdfFileName - the name of the PDF file.
noMargin - specifies to generate the pdf file without page margin.
isSimPrintMode - specifies to generate the pdf file using simulated print mode.
isCompressImage - specifies to generate the pdf file with compressed image.
Returns:
true if exported successfully.
See Also:
exportToPdf(String, PDFParameter)

exportToPdf

public boolean exportToPdf(java.lang.String pdfFileName,
                           boolean noMargin,
                           boolean isSimPrintMode,
                           int isCompressImage,
                           boolean isTransparent)
Deprecated. please the method exportToPdf(String, PDFParameter)

Exports the report result file(with the .rst extension)to a PDF file.

Parameters:
pdfFileName - the PDF file name.
noMargin - specifies to generate the pdf file without page margin.
isSimPrintMode - specifies to generate the pdf file using simulated print mode.
isCompressImage - specifies the image compress rate to generate the pdf file.
isTransparent - specifies to generate the pdf file with transparent gif image.
Returns:
true if exported successfully.
See Also:
exportToPdf(String, PDFParameter)

exportToPdf

public boolean exportToPdf(java.lang.String pdfFileName,
                           boolean noMargin,
                           boolean isSimPrintMode,
                           int isCompressImage,
                           boolean isTransparent,
                           boolean bToc,
                           boolean bDrill)
Deprecated. please the method exportToPdf(String, PDFParameter)

Exports the report result file(with the .rst extension)to a PDF file.

Parameters:
pdfFileName - the PDF file name.
noMargin - specifies to generate the pdf file without page margin.
isSimPrintMode - specifies to generate the pdf file using simulated print mode.
isCompressImage - indicatess the image compress rate to generate the pdf file.
isTransparent - specifies to generate the pdf file with transparent gif image.
bToc - specifies to generate the pdf file with TOC.
bDrill - specifies to generate the pdf file with drill down.
Returns:
true if exported successfully.
See Also:
exportToPdf(String, PDFParameter)

exportToPdf

public boolean exportToPdf(java.lang.String pdfFileName,
                           boolean noMargin,
                           boolean isSimPrintMode,
                           int isCompressImage,
                           boolean isTransparent,
                           boolean bToc,
                           boolean bDrill,
                           java.lang.String password)
Deprecated. please the method exportToPdf(String, PDFParameter)

Exports the report result file(with the .rst extension)to a PDF file.

Parameters:
pdfFileName - the PDF file name.
noMargin - specifies to generate the pdf file without page margin.
isSimPrintMode - specifies to generate the pdf file using simulated print mode.
isCompressImage - specifies the image compress rate to generate the pdf file.
isTransparent - specifies to generate the pdf file with transparent gif image.
bToc - specifies to generate the pdf file with TOC.
bDrill - specifies to generate the pdf file with drill down.
Returns:
true if exported successfully.
See Also:
exportToPdf(String, PDFParameter)

exportToPdf

public boolean exportToPdf(java.lang.String fileName,
                           PDFParameter parameter)
Exports the current report to a pdf file with PDFParameter.

Parameters:
parameter - specifies to generate the pdf file with the all pdf parameters.
fileName - the name of the exporting result file
Returns:
true if exported successfully.
See Also:
PDFParameter

exportToText

public boolean exportToText(java.lang.String textFileName,
                            boolean isNormalText)
Deprecated. please use the method exportToText(String, TextParameter)

Exports the current report to a TEXT file.

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 one record in the report. It can be used as a text datasource to exchange data with other applications.

Returns:
true if exported successfully.
See Also:
exportToText(String, TextParameter)

exportToText

public boolean exportToText(java.lang.String textFileName,
                            boolean isNormalText,
                            int udchWidth,
                            int udchHeight)
Deprecated. please use the method exportToText(String, TextParameter)

Exports the current report to a TEXT file.

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 a record in the report. It can be used as a text datasource to exchange data with other applications.

udchWidth - the width of user defined characters.
udchHeight - the height of user defined characters.
Returns:
true if exported successfully.
See Also:
exportToText(String, TextParameter)

exportToText

public boolean exportToText(java.lang.String textFileName,
                            boolean isNormalText,
                            int udchWidth,
                            int udchHeight,
                            boolean compress,
                            int resolution)
Deprecated. please use the method exportToText(String, TextParameter)

Exports the current report to a TEXT file.

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 a record in the report. It can be used as a text datasource to exchange data with other applications.

udchWidth - the width of user defined characters.
udchHeight - the height of user defined characters.
compress - removes empty lines in the exported text file.
resolution - sets resolution when export to text.
Returns:
true if exported successfully.
See Also:
exportToText(String, TextParameter)

exportToText

public boolean exportToText(java.lang.String textFileName,
                            boolean isNormalText,
                            boolean isRepeat,
                            char delimiter)
Deprecated. please use the method exportToText(String, TextParameter)

Exports current report(with the .rst extension) to a TEXT file.

Parameters:
textFileName - the TEXT file name.
isNormalText - is to set whether this text file is in normal text format or standard data format.

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

isRepeat - indicates whether to repeat the same contents.
delimiter - delimiter is used in SDF(Standard Data Format) format.
Returns:
true if exportation is successful.
See Also:
exportToText(String, TextParameter)

exportToText

public boolean exportToText(java.lang.String textFileName,
                            boolean isNormalText,
                            boolean isRepeat,
                            char delimiter,
                            boolean compress)
Deprecated. please use the method exportToText(String, TextParameter)

Exports current report(with the .rst extension) to a TEXT file.

Parameters:
textFileName - the TEXT file name.
isNormalText - is to set whether this text file is in normal text format or standard data format.

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

isRepeat - indicates whether to repeat the same contents.
delimiter - delimiter is used in SDF(Standard Data Format) format.
compress - removes empty lines or redundant delimiters in the exported text file.
Returns:
true if exportation successful
See Also:
exportToText(String, TextParameter)

exportToText

public boolean exportToText(java.lang.String textFileName,
                            boolean isNormalText,
                            boolean isRepeat,
                            char delimiter,
                            boolean compress,
                            boolean quoteMark)
Deprecated. please use the method exportToText(String, TextParameter)

Exports current report(with the .rst extension) to a TEXT file.

Parameters:
textFileName - the TEXT file name.
isNormalText - is to set whether this text file is in normal text format or standard data format

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

isRepeat - indicates whether to repeat the same contents.
delimiter - delimiter is used in SDF(Standard Data Format) format.
compress - removes empty lines or redundant delimiters in the exported text file.
quoteMark - use quoteMark or not
Returns:
true if exportation is successful
See Also:
exportToText(String, TextParameter)

exportToText

public boolean exportToText(java.lang.String textFileName,
                            boolean isNormalText,
                            int udchWidth,
                            int udchHeight,
                            boolean compress,
                            int resolution,
                            boolean quoteMark)
Deprecated. please use the method exportToText(String, TextParameter)

Exports the current report to a TEXT file.

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 one record in the report. It can be used as a text datasource to exchange data with other applications.

udchWidth - the width of user defined characters.
udchHeight - the height of user defined characters.
compress - removes empty lines in the exported text file.
resolution - sets resolution when exporting to text.
Returns:
true if exported successfully.
See Also:
exportToText(String, TextParameter)

exportToText

public boolean exportToText(java.lang.String textFileName,
                            boolean isNormalText,
                            boolean isRepeat,
                            char delimiter,
                            int udchWidth,
                            int udchHeight,
                            boolean compress,
                            int resolution,
                            boolean quoteMark,
                            boolean hasHeadfoot)
Deprecated. please use the method exportToText(String, TextParameter)

Parameters:
textFileName -
isNormalText -
isRepeat -
delimiter -
udchWidth -
udchHeight -
compress -
resolution -
quoteMark -
hasHeadfoot -
Returns:
true if exporting to text file is successful.
See Also:
exportToText(String, TextParameter)

exportToText

public boolean exportToText(java.lang.String textFileName,
                            boolean isNormalText,
                            boolean isRepeat,
                            char delimiter,
                            int udchWidth,
                            int udchHeight,
                            boolean compress,
                            int resolution,
                            boolean quoteMark,
                            boolean hasHeadfoot,
                            boolean forWindows)
Deprecated. please use the method exportToText(String, TextParameter)

Exports current report to a TEXT file.

Parameters:
textFileName - the TEXT file name.
isNormalText - is to set whether this text file is in normal text format or standard data format.

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

isRepeat - indicates whether to repeat the same contents.
delimiter - delimiter is used in SDF(Standard Data Format) format.
udchWidth - the width of user defined characters.
udchHeight - the height of user defined characters.
compress - removes empty lines or redundant delimiters in the exported text file.
resolution - defines the resolution by which the character will be converted.
quoteMark - keeps the quote character in standard format text.
forWindows - to indicate the platform on which the text file will be accessed.
Returns:
true if exported successfully.
See Also:
exportToText(String, TextParameter)

exportToText

public boolean exportToText(java.lang.String textFileName,
                            boolean isNormalText,
                            boolean isRepeat,
                            char delimiter,
                            int udchWidth,
                            int udchHeight,
                            boolean compress,
                            int resolution,
                            boolean quoteMark,
                            boolean hasHeadfoot,
                            boolean forWindows,
                            boolean ignoreDelimiter)
Deprecated. please use the method exportToText(String, TextParameter)

Exports current report to a TEXT file.

Parameters:
textFileName - the TEXT file name.
isNormalText - is to set whether this text file is in normal text format or standard data format.

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

isRepeat - indicates whether to repeat the same contents.
delimiter - delimiter is used in SDF(Standard Data Format) format.
udchWidth - the width of user defined characters.
udchHeight - the height of user defined characters.
compress - removes empty lines or redundant delimiters in the exported text file.
resolution - defines the resolution by which the character will be converted.
quoteMark - keeps the quote character in standard format text.
forWindows - to indicate the platform on which the text file will be accessed.
ignoreDelimiter - ignores the delimiter
Returns:
true if exported successfully.
See Also:
exportToText(String, TextParameter)

exportToText

public boolean exportToText(java.lang.String textFileName,
                            TextParameter textParameter)
Exports to text file with the TextParameter.

Parameters:
textFileName - the exported result file name.
textParameter - holds all needed parameters for exporting to text file.
Returns:
true if exported successfully.
See Also:
TextParameter

exportToPS

public boolean exportToPS(java.lang.String psFileName)
Deprecated. please use the method exportToPS(String, PSParameter)

Exports the current report to a PS(PostScript) file.

Parameters:
psFileName - the PS file name.
Returns:
true if exported successfully.
See Also:
exportToPS(String, PSParameter)

exportToPS

public boolean exportToPS(java.lang.String psFileName,
                          boolean noMargin)
Deprecated. please use the method exportToPS(String, PSParameter)

Exports the current report to a PS(PostScript) file.

Parameters:
psFileName - the PS file name.
noMargin, - specifies to export to a PS file without page margin.
Returns:
true if exported successfully.
See Also:
exportToPS(String, PSParameter)

exportToPS

public boolean exportToPS(java.lang.String psFileName,
                          PSParameter psParameter)
Exports the current report to ps file with the PSParameter.

Parameters:
psFileName - the exporing result file name.
psParameter - holds the needed parameters for exporting to ps.
Returns:
true if exporting to ps file is successful.
See Also:
PSParameter

exportToRtf

public boolean exportToRtf(java.lang.String rtfFileName)
Deprecated. please use the method exportToPS(String, PSParameter)

Exports the current report to RTF(Rich Text Format). The result of the RTF file is saved as a .rtf file. This file can be opened by Microsoft Word.

Parameters:
rtfFileName - the Rtf file name.
Returns:
true if exported successfully.
See Also:
exportToPS(String, PSParameter)

exportToRtf

public boolean exportToRtf(java.lang.String rtfFileName,
                           boolean noMargin)
Deprecated. please use the method exportToPS(String, PSParameter)

Exports the current report to RTF(Rich Text Format). The result of the RTF file is saved as a .rtf file. This file can be opened by Microsoft Word.

Parameters:
rtfFileName - the Rtf file name.
noMargin, - specifies to export to Rtf file without page margin.
Returns:
true if exported successfully.
See Also:
exportToPS(String, PSParameter)

exportToRtf

public boolean exportToRtf(java.lang.String rtfFileName,
                           RtfParameter rtfParameter)
Exports the current report to rtf file with the RtfParameter.

Parameters:
rtfFileName - the exported result file name.
rtfParameter - holds all needed parameters for exporting to rtf file.
Returns:
true if exported successfully.
See Also:
RtfParameter

getAllRtfFile

public java.util.Vector getAllRtfFile()
Gets all the result files after exporting to rtf.

Returns:

exportToXls

public boolean exportToXls(java.lang.String xlsFileName)
Deprecated. please use the method exportToXls(String, ExcelParameter)

Keeps the original word wrap type.

See Also:
exportToXls(String, int), exportToXls(String, ExcelParameter)

exportToXls

public boolean exportToXls(java.lang.String xlsFileName,
                           int isWordWrap)
Deprecated. please use the method exportToXls(String, ExcelParameter).

Exports the report to excel but not as excel 2000 file.

See Also:
exportToXls(String, int, boolean), exportToXls(String, ExcelParameter)

exportToXls

public boolean exportToXls(java.lang.String xlsFileName,
                           int isWordWrap,
                           boolean isBiff8)
Deprecated. please use the method exportToXls(String, ExcelParameter)

Exports the report to excel, but does not export the shape.

See Also:
exportToXls(String, int, boolean, int), exportToXls(String, ExcelParameter)

exportToXls

public boolean exportToXls(java.lang.String xlsFileName,
                           int isWordWrap,
                           boolean isBiff8,
                           int param)
Deprecated. please use the method exportToXls(String, ExcelParameter)

Exports the report to excel file.

Parameters:
xlsFileName - the excel file name, which includes the file path.
isWordWrap - the word wrap type. KEEPORIGIN is to keep the original word wrap. NOWORDWRAP means no word wrap and WORDWRAPALL means word wrap all.
isBiff8 - the flag whether to export to excel 2000.
param - the flag whether to export the shape to excel file. When isBiff8 is set to true, the flag will not take effect on the excel file, becaue excel 2000 does not support the shape exporting. NOEXPORTSHAPE means that you can not export the shape to excel file and EXPORTSHAPE means that you can export the shape to excel file.
Returns:
true when exporting to excel is successful and false when exporting to excel file failed.
See Also:
ExcelParameter.KEEPORIGIN, ExcelParameter.NOWORDWRAP, ExcelParameter.WORDWRAPALL, ExcelParameter.NOEXPORTSHAPE, ExcelParameter.EXPORTSHAPE, exportToXls(String, ExcelParameter), exportToXls(String, ExcelParameter)

exportToXls

public boolean exportToXls(java.lang.String xlsFileName,
                           ExcelParameter excelParameter)
Exports to excel with the ExcelParameter.

Parameters:
xlsFileName - the file name of the exported result file.
excelParameter - holds the parameters needed for exporting to excel.
Returns:
true when exporting to excel is successful and false when exporting to excel file failed.
See Also:
ExcelParameter

getAllXlsFile

public java.util.Vector getAllXlsFile()
Gets all the result files after exporting to excel.

Returns:

exportToXML

public boolean exportToXML(java.lang.String xmlFileName,
                           boolean isDataOnly,
                           java.lang.String xsdFile)
Exports the current report to XML, the result of which is saved as a .xml file. This file can be opened by IE5.5.

Parameters:
xmlFileName - the XML file name.
isDataOnly, - indicates that only database column information is exported to the XML file. Otherwise all report details, including all the properties will be exported.
xsdFile - the schema file on which the exporting to xml is based. If you set it to null, JReport will output the new xsd file.

exportToXML

public boolean exportToXML(java.lang.String xmlFileName,
                           boolean isDataOnly)
Deprecated. please use exportToXML(String, boolean, String)

See Also:
exportToXML(String, boolean, boolean)

exportToXML

public boolean exportToXML(java.lang.String xmlFileName,
                           boolean isMutibleFile,
                           boolean isDataOnly)
Deprecated. replaced by exportToXML(String, boolean, String)


getAllXMLFile

public java.util.Vector getAllXMLFile()
Gets all the result files after exporting to xml.

Returns:

exit

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


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 users 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 users to go to the first page of the 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 users 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 users 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 users 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 output 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.

Parameters:
fileName - the log file name

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

Returns:
true if successful

saveAs

public java.lang.String saveAs()
Saves this report as a new result file.

Returns:
a String, "Ok" means you have successfully saved this report as a new result file, "No report load" means no report is loaded in.

zoom

public void zoom(int zoomRatio)
Zooms the report.


isZipStream

public boolean isZipStream(java.io.InputStream ins)
Judges whether user stream is compressed or not.

Parameters:
ins - user input stream.
Returns:
true: is compressed Stream, false: is uncompressed stream.

setScrollbars

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

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

hasScrollbars

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


getScrollbars

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


closeLog

public void closeLog()
closes the log stream.

When all engines are finised, you can call the method.


setHomePath

public void setHomePath(java.lang.String homepath)
Sets home path.

Parameters:
homepath - the string of home path.