|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
jet.bean.JRResultViewer
public class JRResultViewer
for view the rst file and some exporting to file function
JRSetResultViewer since JReport V8
| 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 |
|---|
public static final int vOff
public static final int vDebug
public static final int vError
public static final int LANDSCAPE
public static final int PORTRAIT
public static final int IE
public static final int NETSCAPE
| Constructor Detail |
|---|
public JRResultViewer()
public JRResultViewer(boolean showButton)
showButton - boolean type, if it is true, the turning page buttons
will be shown.| Method Detail |
|---|
public void setInputStream(java.io.InputStream ins,
boolean zip)
ins - the user input stream.zip - whether the result stream is compressed or not.isZipStream(InputStream)public void addClickActionListener(ClickActionListener clickActionListener)
clickActionListener - listens to the event when clicking on
a field in viewer.public void setTempPath(java.lang.String sTempPath)
sTempPath - the temporary path(absolute path).public java.lang.String getTempPath()
public java.lang.String getReportName()
public void setReportName(java.lang.String reportName)
reportName - the report name.public int getPageOrientation()
LANDSCAPE,
PORTRAITpublic void setCommunicator(Communicator communicator)
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.
communicator - the communicator.JREngine.getReportCommunicator()public boolean isShowButton()
show the buttons to turn page.
show the button and disabled when it is falsepublic void setShowButton(boolean bShowButton)
show the turning page buttons or not.
public java.lang.String getLoadReport()
setLoadReport(String)public void setLoadReport(java.lang.String loadReport)
loadReport - a String, if it equals "yes"(case insensitive) then the report will be run.public void printReport()
public void printReport(java.lang.Object printJob,
java.lang.Object pageFormat,
boolean bInteractive,
boolean bInBackground,
boolean bUseJDK11)
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);
public void printReport(java.lang.Object printJob,
java.lang.Object pageFormat,
boolean bInteractive,
boolean bInBackground,
boolean bUseJDK11,
boolean bSeparateLargePage)
printReport(Object, Object, boolean, boolean, boolean, boolean, String)
public void printReport(java.lang.Object printJob,
java.lang.Object pageFormat,
boolean bInteractive,
boolean bInBackground,
boolean bUseJDK11,
boolean bSeparateLargePage,
java.lang.String jobName)
printReport(Object, Object, boolean, boolean, boolean, boolean, String, String)
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)
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 nameprinter - the printer
Note: This printing mothod is not recommended, it may cause some unexpected errors, for example, you may get an extra blank page.
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
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.4bInBackground - 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");
NoSuchPrintAttributeException
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
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);
}
NoSuchPrintAttributeException - if these parameters in attributeInfo or customMedias do not support, or
if the JDK version is less than JDK 1.4.0PrintConfig,
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.CustomJobNamepublic static java.util.Vector getAllPrinters()
public java.lang.String getPrintStatus()
public void setPrintStatus()
public java.awt.Dimension getMinimumSize()
getMinimumSize in class javax.swing.JComponentpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class javax.swing.JComponentpublic void runReport()
public boolean exportToHtml(java.lang.String htmlFileName)
htmlFileName - the HTML file name.
exportToHtml(String, HtmlParameter)
public boolean exportToHtml(java.lang.String htmlFileName,
boolean bChartApplet,
boolean isMultiFile,
boolean bUsingTable,
boolean bHyperlink,
boolean bPageNum,
boolean bAbsolute,
int iBrowser)
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 filesbHyperlink - indicates whether to generate a hyperlinkbPageNum - indicates whether to generate page numbersbAbsolute - indicates the font size is absolute or relativeiBrowser - indicates the browser is IE or NETSCAPE. The value of
parameter int browser must be one of the IE or NETSCAPE.
exportToHtml(String, HtmlParameter)
public boolean exportToHtml(java.lang.String htmlFileName,
boolean bChartApplet,
boolean isMultiFile,
boolean bUsingTable,
boolean bHyperlink,
boolean bPageNum,
boolean bAbsolute,
int iBrowser,
boolean bincdrilldownfile)
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 filesbHyperlink - indicates whether to generate a hyperlinkbPageNum - indicates whether to generate page numbersbAbsolute - indicates the font size is absolute or relativeiBrowser - 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
exportToHtml(String, HtmlParameter)
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)
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 filesbHyperlink - indicates whether to generate a hyperlinkbPageNum - indicates whether to generate page numbersbAbsolute - indicates the font size is absolute or relativeiBrowser - 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.
exportToHtml(String, String, boolean, boolean, boolean, boolean, boolean, boolean, int, boolean, boolean, int)
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)
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 filesbHyperlink - indicates whether to generate a hyperlinkbPageNum - indicates whether to generate page numbersbAbsolute - indicates the font size is absolute or relativeiBrowser - 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
public void setHtmlImageType(int imageType)
imageType -
public boolean exportToHtml(java.lang.String htmlFileName,
HtmlParameter htmlParameter)
htmlFileName - htmlParameter -
public java.util.Vector getAllHtmlFile()
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)
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 filesbHyperlink - indicates whether to generate a hyperlinkbPageNum - indicates whether to generate page numbersbAbsolute - indicates the font size is absolute or relativeiBrowser - 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.
public boolean exportToDhtml(java.lang.String htmlFileName)
htmlFileName - the HTML file name.
exportToDhtml(String, boolean, boolean, boolean, boolean, boolean, boolean, int)
public boolean exportToDhtml(java.lang.String htmlFileName,
boolean bChartApplet,
boolean isMultiFile,
boolean bUsingTable,
boolean bHyperlink,
boolean bPageNum,
boolean bAbsolute,
int iBrowser)
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 filesbHyperlink - indicates whether to generate a hyperlinkbPageNum - indicates whether to generate page numbersbAbsolute - indicates the font size is absolute or relativeiBrowser - indicates the browser is IE or NETSCAPE. The value of
parameter int browser must be one of the IE or NETSCAPE.
public boolean exportToDhtml(java.lang.String htmlFileName,
boolean bChartApplet,
boolean isMultiFile,
boolean bUsingTable,
boolean bHyperlink,
boolean bPageNum,
boolean bAbsolute,
int iBrowser,
boolean bincdrilldownfile)
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 filesbHyperlink - indicates whether to generate a hyperlinkbPageNum - indicates whether to generate page numbersbAbsolute - indicates the font size is absolute or relativeiBrowser - 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
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)
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 filesbHyperlink - indicates whether to generate a hyperlinkbPageNum - indicates whether to generate page numbersbAbsolute - indicates the font size is absolute or relativeiBrowser - indicates the browser is IE or NETSCAPE. The value of
the parameter iBrowser must be one of the bincdrilldownfile - indicates the drilldown html files were included in file listnoMargin - indicates to generate the html files without page margin.
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)
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 filesbHyperlink - indicates whether to generate a hyperlinkbPageNum - indicates whether to generate page numbersbAbsolute - indicates the font size is absolute or relativeiBrowser - indicates the browser is IE or NETSCAPE. The value of
the parameter iBrowser must be one of the bincdrilldownfile - indicates the drilldown html files were included in file listnoMargin - indicates to generate the html files without page margin.resolution - indicates the resolution of the html files
public boolean exportToPdf(java.lang.String pdfFileName)
pdfFileName - the name of the PDF file.
exportToPdf(String, PDFParameter)
public boolean exportToPdf(java.lang.String pdfFileName,
boolean noMargin)
pdfFileName - the name of the PDF file.noMargin - indicates to generate the pdf file without page margin.
exportToPdf(String, PDFParameter)
public boolean exportToPdf(java.lang.String pdfFileName,
boolean noMargin,
boolean isSimPrintMode)
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.
exportToPdf(String, PDFParameter)
public boolean exportToPdf(java.lang.String pdfFileName,
boolean noMargin,
boolean isSimPrintMode,
boolean isCompressImage)
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.
exportToPdf(String, PDFParameter)
public boolean exportToPdf(java.lang.String pdfFileName,
boolean noMargin,
boolean isSimPrintMode,
int isCompressImage,
boolean isTransparent)
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.
exportToPdf(String, PDFParameter)
public boolean exportToPdf(java.lang.String pdfFileName,
boolean noMargin,
boolean isSimPrintMode,
int isCompressImage,
boolean isTransparent,
boolean bToc,
boolean bDrill)
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.
exportToPdf(String, PDFParameter)
public boolean exportToPdf(java.lang.String pdfFileName,
boolean noMargin,
boolean isSimPrintMode,
int isCompressImage,
boolean isTransparent,
boolean bToc,
boolean bDrill,
java.lang.String password)
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.
exportToPdf(String, PDFParameter)
public boolean exportToPdf(java.lang.String fileName,
PDFParameter parameter)
PDFParameter.
parameter - indicates to generate the pdf file with the all pdf parameters.fileName - the exporting result file name
PDFParameter
public boolean exportToText(java.lang.String textFileName,
boolean isNormalText)
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.
exportToText(String, TextParameter)
public boolean exportToText(java.lang.String textFileName,
boolean isNormalText,
int udchWidth,
int udchHeight)
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.
exportToText(String, TextParameter)
public boolean exportToText(java.lang.String textFileName,
boolean isNormalText,
int udchWidth,
int udchHeight,
boolean compress,
int resolution)
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.
exportToText(String, TextParameter)
public boolean exportToText(java.lang.String textFileName,
boolean isNormalText,
boolean isRepeat,
char delimiter)
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
exportToText(String, TextParameter)
public boolean exportToText(java.lang.String textFileName,
boolean isNormalText,
boolean isRepeat,
char delimiter,
boolean compress)
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) formatcompress - remove empty lines or redundant delimiters in the exported text file.
exportToText(String, TextParameter)
public boolean exportToText(java.lang.String textFileName,
boolean isNormalText,
boolean isRepeat,
char delimiter,
boolean compress,
boolean quoteMark)
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) formatcompress - remove empty lines or redundant delimiters in the exported text file.quoteMark - use quoteMark or not
exportToText(String, TextParameter)
public boolean exportToText(java.lang.String textFileName,
boolean isNormalText,
int udchWidth,
int udchHeight,
boolean compress,
int resolution,
boolean quoteMark)
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.
exportToText(String, TextParameter)
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)
textFileName - isNormalText - isRepeat - delimiter - udchWidth - udchHeight - compress - resolution - quoteMark - hasHeadfoot -
exportToText(String, TextParameter)
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)
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) formatudchWidth - 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 convertedquoteMark - keep the quote character in standard format textforWindows - to indicate the platform on which the text file will be accessed.
exportToText(String, TextParameter)
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)
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) formatudchWidth - 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 convertedquoteMark - keep the quote character in standard format textforWindows - to indicate the platform on which the text file will be accessed.ignoreDelimiter - ignore the delimiter
exportToText(String, TextParameter)
public boolean exportToText(java.lang.String textFileName,
TextParameter textParameter)
TextParameter
textFileName - the exporting result file nametextParameter - holds all exporting to text file needed parameters
TextParameterpublic boolean exportToPS(java.lang.String psFileName)
psFileName - the PS file name.
exportToPS(String, PSParameter)
public boolean exportToPS(java.lang.String psFileName,
boolean noMargin)
psFileName - the PS file name.noMargin - ,indicate to export to PS file without page margin.
exportToPS(String, PSParameter)
public boolean exportToPS(java.lang.String psFileName,
PSParameter psParameter)
PSParameter
psFileName - the exporing result file namepsParameter - hold the exporting to ps needed parameters
PSParameterpublic boolean exportToRtf(java.lang.String rtfFileName)
rtfFileName - the Rtf file name.
exportToPS(String, PSParameter)
public boolean exportToRtf(java.lang.String rtfFileName,
boolean noMargin)
rtfFileName - the Rtf file name.noMargin - ,indicate to export to Rtf file without page margin.
exportToPS(String, PSParameter)
public boolean exportToRtf(java.lang.String rtfFileName,
RtfParameter rtfParameter)
RtfParameter
rtfFileName - the exporting result file namertfParameter - holds all exporting to rtf file needed parameters
RtfParameterpublic java.util.Vector getAllRtfFile()
public boolean exportToXls(java.lang.String xlsFileName)
exportToXls(String, int),
exportToXls(String, ExcelParameter)
public boolean exportToXls(java.lang.String xlsFileName,
int isWordWrap)
exportToXls(String, int, boolean),
exportToXls(String, ExcelParameter)
public boolean exportToXls(java.lang.String xlsFileName,
int isWordWrap,
boolean isBiff8)
exportToXls(String, int, boolean, int),
exportToXls(String, ExcelParameter)
public boolean exportToXls(java.lang.String xlsFileName,
int isWordWrap,
boolean isBiff8,
int param)
xlsFileName - the excel file name, it include the file pathisWordWrap - the word wrap type, KEEPORIGIN is keep the original word wrap
NOWORDWRAP is no word wrap and WORDWRAPALL is all word wrapisBiff8 - the flag whether export to excel 2000param - 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
ExcelParameter.KEEPORIGIN,
ExcelParameter.NOWORDWRAP,
ExcelParameter.WORDWRAPALL,
ExcelParameter.NOEXPORTSHAPE,
ExcelParameter.EXPORTSHAPE,
exportToXls(String, ExcelParameter),
exportToXls(String, ExcelParameter)
public boolean exportToXls(java.lang.String xlsFileName,
ExcelParameter excelParameter)
ExcelParameter
xlsFileName - the exporting result file nameexcelParameter - holds the parameters that export to excel needed
ExcelParameterpublic java.util.Vector getAllXlsFile()
public boolean exportToXML(java.lang.String xmlFileName,
boolean isDataOnly,
java.lang.String xsdFile)
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
public boolean exportToXML(java.lang.String xmlFileName,
boolean isDataOnly)
exportToXML(String, boolean, String)
exportToXML(String, boolean, boolean)
public boolean exportToXML(java.lang.String xmlFileName,
boolean isMutibleFile,
boolean isDataOnly)
exportToXML(String, boolean, String)
public java.util.Vector getAllXMLFile()
public void exit()
public java.lang.String getStatus()
public int getCurrentPageNumber()
public int getTotalPageNumber()
public int gotoPage(int pageNumber)
pageNumber - the specified page number.
public java.lang.String firstPage()
public java.lang.String prevPage()
public java.lang.String nextPage()
public java.lang.String lastPage()
public void setShowInfoLevel(int level)
level - the debug level, for example: vDebug | vErrorpublic boolean setLogFile(java.lang.String fileName)
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
public java.lang.String saveAs()
public void zoom(int zoomRatio)
public boolean isZipStream(java.io.InputStream ins)
ins - user input stream.
public void setScrollbars(boolean b)
b - if true, there are scrollbars; otherwise, no scrollbars.public boolean hasScrollbars()
public boolean getScrollbars()
public void closeLog()
when all the engine have finised can call the method.
public void setHomePath(java.lang.String homepath)
homepath - the string of home path.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||