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 view the rst file and some exporting to file function

some function 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
 
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
          Indicates 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
          Indicates to open the debug.
static int vError
          Indicates to open the error.
static int vOff
          Indicates 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(ClickActionListener clickActionListener)
          Adds the click action listener.
 void closeLog()
          close the log stream.
 void exit()
          When 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 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, boolean noMargin)
          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, boolean noMargin, int resolution)
          Exports result report 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 result report 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)
          export 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 result report file(with the .rst extension)to a HTML file.
 boolean exportToHtml(java.lang.String rstFileName, java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser, boolean bincdrilldownfile, boolean noMargin, int resolution)
          Exports result report file(with the .rst extension)to a 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)
          export 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)
          export 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)
          export 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)
          export 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. plase 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.
 java.lang.String firstPage()
          Enables users to go to the first page of report.
 java.util.Vector getAllHtmlFile()
          Returns all html files that are generated by exportToHtml.
static java.util.Vector getAllPrinters()
          for get the all printer in system.Only can do this in JDK14 and advance JDK version
 java.util.Vector getAllRtfFile()
          get all exporting to rtf result files
 java.util.Vector getAllXlsFile()
          get all exporting to excel result files
 java.util.Vector getAllXMLFile()
          get all exporting to xml result files
 int getCurrentPageNumber()
          Gets the current page numbers of the report.
 java.lang.String getLoadReport()
           
 java.awt.Dimension getMinimumSize()
          get the minimum size, that is its width and high are 0 and 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, may be return the value("")
 boolean getScrollbars()
          Tell user there have 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 numbers of the report.
 int gotoPage(int pageNumber)
          Enables users to go to the specified page of the report.
 boolean hasScrollbars()
          Tell user there have scrollbars or not.
 boolean isShowButton()
          Returns the status whether show the buttons to turn page.
 boolean isZipStream(java.io.InputStream ins)
          Judge 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, not 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 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 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()
          set the print status before printing.
 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 turning page 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, 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, 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
Indicates to close the debug.


vDebug

public static final int vDebug
Indicates to open the debug.


vError

public static final int vError
Indicates to open the error.


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.


NETSCAPE

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

Constructor Detail

JRResultViewer

public JRResultViewer()
The default constructor.


JRResultViewer

public JRResultViewer(boolean showButton)
The constructor.

Parameters:
showButton - boolean type, if it is true, the turning page buttons will be shown.
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(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, may be 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 specify that produce error when get 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 users set the communicator, this viewer will load report from this communicator, not the result file---rst.

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

isShowButton

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

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

setShowButton

public void setShowButton(boolean bShowButton)
Sets the status whether to show the turning page 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, not 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. 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)
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 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 seperate the large page of the report automatically. After you set it to true, for JDK1.2 or higher, the page format dialog will be popped up. In this dialog, you can choose the page format which you want to print with, we will use this page size for printing. For JDK1.1.x, however, you must change the page format which you want to print with in the print dialog(click the property button, then choose the page format).
jobName - the print job name
printer - the printer

Note: This printing mothod 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 NoSuchPrintAttributeException
Prints the report with the specified parameters.

Parameters:
job - the print job of this print action.It is a instance of PrintJob or PrinterJob. You can pass a PrinterJob or PrintJob object.If you set a null value,there would be create a PrinterJob or PrintJob for your task. There need 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 is true, informations taked by printerjob would 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 a 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 to use 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 a interface which contains two methods that 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 - 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. 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 provide more options to do print such as specify tray.
jobName - specify print job name.
attributeInfo - is a vector which 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 - 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 printReport method is recommend 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:
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 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 a interface which contains two methods that 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 - specify print job name.
attributeInfo - is a vector which 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 standard tray defined in java. If want to specify a special tray ,he must specify a printer name.Otherwise there will find this tray in default printer.If the specify printer has not such a tray,there would throw a NoSuchPrintAttributeException. If needed,you may get all media tray's names in a special printer by call 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 - 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. 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:
NoSuchPrintAttributeException - if these parameters in attributeInfo or customMedias do not support, or if the JDK version is less than JDK 1.4.0
Since:
version 7.x SP2, version 8.0
See Also:
PrintConfig, jet.bean.CustomMediaCopies, jet.bean.CustomMediaMargin, jet.bean.CustomMediaTray, jet.bean.CustomJobPriority, jet.bean.CustomMediaPaper, jet.bean.CustomPageRanges, jet.bean.CustomToFile, jet.bean.CustomUserName, jet.bean.CustomJobName

getAllPrinters

public static java.util.Vector getAllPrinters()
for get the all printer in system.Only can do this in JDK14 and advance JDK version

Returns:
Vector that hold the system printers. note, if version less than JDK1.4, will 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()
set the print status before printing. it is used in printing background.


getMinimumSize

public java.awt.Dimension getMinimumSize()
get the minimum size, that is its width and high are 0 and 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 exist 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 result report file(with the .rst extension)to a 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 font size is absolute or relative
iBrowser - indicates the browser is IE or NETSCAPE. The value of parameter int browser must be one of the 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 the font size is absolute or relative
iBrowser - indicates the browser is IE or NETSCAPE. The value of parameter int browser must be one of the 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 result report file(with the .rst extension)to a HTML file.

Parameters:
rstFileName - the result file name.
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet.
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 font size is absolute or relative
iBrowser - indicates the browser is IE or NETSCAPE. The value of parameter int browser must be one of the IE or NETSCAPE.
bincdrilldownfile - indicates to generate the drilldown html files in the file list.
noMargin - indicates 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 result report file(with the .rst extension)to a HTML file.

Parameters:
rstFileName - the result file name.
htmlFileName - the HTML file name.
bChartApplet - indicates whether the chart in html file is exported as an applet.
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 font size is absolute or relative
iBrowser - indicates the browser is IE or NETSCAPE. The value of parameter int browser must be one of the IE or NETSCAPE.
bincdrilldownfile - indicates to generate the drilldown html files in the file list.
noMargin - indicates 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)
export 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 result report 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 the font size is absolute or relative
iBrowser - indicates the browser is IE or NETSCAPE. The value of parameter int browser must be one of the IE or NETSCAPE.
bincdrilldownfile - indicates to generate the drilldown html files in the 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)
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 the font size is absolute or relative
iBrowser - indicates the browser is IE or NETSCAPE. The value of parameter int browser must be one of the 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 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 the font size is absolute or relative
iBrowser - indicates the browser is IE or NETSCAPE. The value of parameter int browser must be one of the IE or NETSCAPE.
bincdrilldownfile - indicates 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 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 the font size is absolute or relative
iBrowser - indicates the browser is IE or NETSCAPE. The value of the parameter iBrowser must be one of the
IE
or
NETSCAPE
.
bincdrilldownfile - indicates 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 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 the font size is absolute or relative
iBrowser - indicates the browser is IE or NETSCAPE. The value of the parameter iBrowser must be one of the
IE
or
NETSCAPE
.
bincdrilldownfile - indicates the drilldown html files were included in file list
noMargin - indicates 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 - indicates 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 - indicates to generate the pdf file without page margin.
isSimPrintMode - indicates to generate the pdf file use 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 - indicates to generate the pdf file without page margin.
isSimPrintMode - indicates to generate the pdf file use simulated print mode.
isCompressImage - indicatess to generate the pdf file compress 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 result report file(with the .rst extension)to a PDF file.

Parameters:
pdfFileName - the PDF file name.
noMargin - indicates to generate the pdf file without page margin.
isSimPrintMode - indicates to generate the pdf file use simulated print mode.
isCompressImage - indicatess the image compress rate to generate the pdf file.
isTransparent - indicatess to generate the pdf file keep 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 result report file(with the .rst extension)to a PDF file.

Parameters:
pdfFileName - the PDF file name.
noMargin - indicates to generate the pdf file without page margin.
isSimPrintMode - indicates to generate the pdf file use simulated print mode.
isCompressImage - indicatess the image compress rate to generate the pdf file.
isTransparent - indicatess to generate the pdf file keep transparent gif image.
bToc - indicatess indicatess to generate the pdf file with TOC.
bDrill - indicatess 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 result report file(with the .rst extension)to a PDF file.

Parameters:
pdfFileName - the PDF file name.
noMargin - indicates to generate the pdf file without page margin.
isSimPrintMode - indicates to generate the pdf file use simulated print mode.
isCompressImage - indicatess the image compress rate to generate the pdf file.
isTransparent - indicatess to generate the pdf file keep transparent gif image.
bToc - indicatess indicatess to generate the pdf file with TOC.
bDrill - indicatess 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 - indicates to generate the pdf file with the all pdf parameters.
fileName - the exporting result file name
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 that each row of it represents each record in the report. It can be used as a text datasource to exchange data with other applications.

Returns:
true if 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 that each row of it represents each record in the report. It can be used as a text datasource to exchange data with other applications.

udchWidth - the width for each unit of the width clearance between columns.
udchHeight - the height for each unit of the height clearance between columns.
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 that each row of it represents each record in the report. It can be used as a text datasource to exchange data with other applications.

udchWidth - the width for each unit of the width clearance between columns.
udchHeight - the height for each unit of the height clearance between columns.
compress - remove empty lines in the exported text file.
resolution - set resolution when export yo 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)

Export 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 normal text format or standard data format

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

isRepeat - indicates whether to repeat the same contents.
delimiter - delimiter used in SDF(Standard Data Format) format
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)
Deprecated. please use the method exportToText(String, TextParameter)

Export 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 normal text format or standard data format

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

isRepeat - indicates whether to repeat the same contents.
delimiter - delimiter used in SDF(Standard Data Format) format
compress - remove 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)

Export 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 normal text format or standard data format

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

isRepeat - indicates whether to repeat the same contents.
delimiter - delimiter used in SDF(Standard Data Format) format
compress - remove empty lines or redundant delimiters in the exported text file.
quoteMark - use quoteMark or not
Returns:
true if exportation 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 that each row of it represents each record in the report. It can be used as a text datasource to exchange data with other applications.

udchWidth - the width for each unit of the width clearance between columns.
udchHeight - the height for each unit of the height clearance between columns.
compress - remove empty lines in the exported text file.
resolution - set resolution when export yo 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 export to text file 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)
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 normal text format or standard data format

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

isRepeat - indicates whether to repeat the same contents.
delimiter - delimiter used in SDF(Standard Data Format) format
udchWidth - the width for each unit of the width clearance between columns.
udchHeight - the height for each unit of the height clearance between columns.
compress - remove empty lines or redundant delimiters in the exported text file.
resolution - define the resolution by which the character be converted
quoteMark - keep 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 normal text format or standard data format

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

isRepeat - indicates whether to repeat the same contents.
delimiter - delimiter used in SDF(Standard Data Format) format
udchWidth - the width for each unit of the width clearance between columns.
udchHeight - the height for each unit of the height clearance between columns.
compress - remove empty lines or redundant delimiters in the exported text file.
resolution - define the resolution by which the character be converted
quoteMark - keep the quote character in standard format text
forWindows - to indicate the platform on which the text file will be accessed.
ignoreDelimiter - ignore the delimiter
Returns:
true if exported successfully.
See Also:
exportToText(String, TextParameter)

exportToText

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

Parameters:
textFileName - the exporting result file name
textParameter - holds all exporting to text file needed parameters
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 - ,indicate to export to 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)
export the current report to ps file with the PSParameter

Parameters:
psFileName - the exporing result file name
psParameter - hold the exporting to ps needed parameters
Returns:
true if export to ps file successfully
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 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.
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 RTF is saved in a .rtf file. This file can be opened by Microsoft Word.

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

exportToRtf

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

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

getAllRtfFile

public java.util.Vector getAllRtfFile()
get all exporting to rtf result files

Returns:

exportToXls

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

keep 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)

export to the report as one not 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)

export to the excel file, the shape is not be exported

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)

export to the report to excel file

Parameters:
xlsFileName - the excel file name, it include the file path
isWordWrap - the word wrap type, KEEPORIGIN is keep the original word wrap NOWORDWRAP is no word wrap and WORDWRAPALL is all word wrap
isBiff8 - the flag whether export to excel 2000
param - the flag whether export the shap to excel file, when the flagisBiff8is true, the flag is not effect on the excel file, becaue excel 2000 can not support the shape exporting. NOEXPORTSHAPEis that can not export the shpae to excel file and EXPORTSHAPE is that export to the shape to excel file
Returns:
true when export to excel successful and false when export 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)
export to excel with the ExcelParameter

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

getAllXlsFile

public java.util.Vector getAllXlsFile()
get all exporting to excel result files

Returns:

exportToXML

public boolean exportToXML(java.lang.String xmlFileName,
                           boolean isDataOnly,
                           java.lang.String xsdFile)
Exports the current report to XML. The result of is saved in 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 which is based when export to xml, if set to null, output the new xsd file
Returns:
true if exported successfully.

exportToXML

public boolean exportToXML(java.lang.String xmlFileName,
                           boolean isDataOnly)
Deprecated. plase 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()
get all exporting to xml result files

Returns:

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 delete 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 numbers of the report.

Returns:
the current page numbers, if no report loaded, -1 will be returned.

getTotalPageNumber

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

Returns:
the total page numbers 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 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 first 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 first page, "No report load" means no report is loaded in and "No More page" means the current page is already the first 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 first page, "No report load" means no report is loaded in and "No More page" means the current page is already the first 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 gone to the first page, "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)
Judge 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()
Tell user there have scrollbars or not. return if true, there have scrollbars; otherwise, no scrollbars.


getScrollbars

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


closeLog

public void closeLog()
close the log stream.

when all the engine have finised can call the method.


setHomePath

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

Parameters:
homepath - the string of home path.