|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel jet.bean.JRResultViewer
public class JRResultViewer
for viewing the rst file and some exporting to file functions
JRSetResultViewer
since JReport V8
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary | |
---|---|
static int |
IE
Indicates that the html browser is IE. |
static int |
LANDSCAPE
The origin is at the bottom left of the paper with x running from bottom to top and y running from left to right. |
static int |
NETSCAPE
Indicates that the html browser is NETSCAPE. |
static int |
PORTRAIT
The origin is at the top left of the paper with x running to the right and y running down the paper. |
static int |
vDebug
Specifies to open the debug. |
static int |
vError
Specifies to open the error. |
static int |
vOff
Specifies to close the debug. |
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JRResultViewer()
The default constructor. |
|
JRResultViewer(boolean showButton)
The constructor. |
Method Summary | |
---|---|
void |
addClickActionListener(jet.thinviewer.ClickActionListener clickActionListener)
Adds the click action listener. |
void |
closeLog()
closes the log stream. |
void |
exit()
If you want to quit from JReport Viewer Bean, you should call this method. |
boolean |
exportToDhtml(java.lang.String htmlFileName)
Exports result report file(with the .rst extension)to a DHTML file. |
boolean |
exportToDhtml(java.lang.String htmlFileName,
boolean bChartApplet,
boolean isMultiFile,
boolean bUsingTable,
boolean bHyperlink,
boolean bPageNum,
boolean bAbsolute,
int iBrowser)
Exports result report file(with the .rst extension)to a DHTML file. |
boolean |
exportToDhtml(java.lang.String htmlFileName,
boolean bChartApplet,
boolean isMultiFile,
boolean bUsingTable,
boolean bHyperlink,
boolean bPageNum,
boolean bAbsolute,
int iBrowser,
boolean bincdrilldownfile)
Exports the report result file(with the .rst extension)to a DHTML file. |
boolean |
exportToDhtml(java.lang.String htmlFileName,
boolean bChartApplet,
boolean isMultiFile,
boolean bUsingTable,
boolean bHyperlink,
boolean bPageNum,
boolean bAbsolute,
int iBrowser,
boolean bincdrilldownfile,
boolean noMargin)
Exports the report result file(with the .rst extension)to a DHTML file. |
boolean |
exportToDhtml(java.lang.String htmlFileName,
boolean bChartApplet,
boolean isMultiFile,
boolean bUsingTable,
boolean bHyperlink,
boolean bPageNum,
boolean bAbsolute,
int iBrowser,
boolean bincdrilldownfile,
boolean noMargin,
int resolution)
Exports the report result file(with the .rst extension)to a DHTML file. |
boolean |
exportToDhtml(java.lang.String rstFileName,
java.lang.String htmlFileName,
boolean bChartApplet,
boolean isMultiFile,
boolean bUsingTable,
boolean bHyperlink,
boolean bPageNum,
boolean bAbsolute,
int iBrowser,
boolean bincdrilldownfile,
boolean noMargin)
Exports the report result file(with the .rst extension)to a DHTML file. |
boolean |
exportToHtml(java.lang.String htmlFileName)
Deprecated. please use the method exportToHtml(String, HtmlParameter) |
boolean |
exportToHtml(java.lang.String htmlFileName,
boolean bChartApplet,
boolean isMultiFile,
boolean bUsingTable,
boolean bHyperlink,
boolean bPageNum,
boolean bAbsolute,
int iBrowser)
Deprecated. please use the method exportToHtml(String, HtmlParameter) |
boolean |
exportToHtml(java.lang.String htmlFileName,
boolean bChartApplet,
boolean isMultiFile,
boolean bUsingTable,
boolean bHyperlink,
boolean bPageNum,
boolean bAbsolute,
int iBrowser,
boolean bincdrilldownfile)
Deprecated. please use the method exportToHtml(String, HtmlParameter) |
boolean |
exportToHtml(java.lang.String htmlFileName,
HtmlParameter htmlParameter)
Exports the current report to html file with the HtmlParameter. |
boolean |
exportToHtml(java.lang.String rstFileName,
java.lang.String htmlFileName,
boolean bChartApplet,
boolean isMultiFile,
boolean bUsingTable,
boolean bHyperlink,
boolean bPageNum,
boolean bAbsolute,
int iBrowser,
boolean bincdrilldownfile,
boolean noMargin)
Exports the report result file(with the .rst extension)to an HTML file. |
boolean |
exportToHtml(java.lang.String rstFileName,
java.lang.String htmlFileName,
boolean bChartApplet,
boolean isMultiFile,
boolean bUsingTable,
boolean bHyperlink,
boolean bPageNum,
boolean bAbsolute,
int iBrowser,
boolean bincdrilldownfile,
boolean noMargin,
int resolution)
Exports the report result file(with the .rst extension)to an HTML file. |
boolean |
exportToPdf(java.lang.String pdfFileName)
Deprecated. please the method exportToPdf(String, PDFParameter) |
boolean |
exportToPdf(java.lang.String pdfFileName,
boolean noMargin)
Deprecated. please the method exportToPdf(String, PDFParameter) |
boolean |
exportToPdf(java.lang.String pdfFileName,
boolean noMargin,
boolean isSimPrintMode)
Deprecated. please the method exportToPdf(String, PDFParameter) |
boolean |
exportToPdf(java.lang.String pdfFileName,
boolean noMargin,
boolean isSimPrintMode,
boolean isCompressImage)
Deprecated. please the method exportToPdf(String, PDFParameter) |
boolean |
exportToPdf(java.lang.String pdfFileName,
boolean noMargin,
boolean isSimPrintMode,
int isCompressImage,
boolean isTransparent)
Deprecated. please the method exportToPdf(String, PDFParameter) |
boolean |
exportToPdf(java.lang.String pdfFileName,
boolean noMargin,
boolean isSimPrintMode,
int isCompressImage,
boolean isTransparent,
boolean bToc,
boolean bDrill)
Deprecated. please the method exportToPdf(String, PDFParameter) |
boolean |
exportToPdf(java.lang.String pdfFileName,
boolean noMargin,
boolean isSimPrintMode,
int isCompressImage,
boolean isTransparent,
boolean bToc,
boolean bDrill,
java.lang.String password)
Deprecated. please the method exportToPdf(String, PDFParameter) |
boolean |
exportToPdf(java.lang.String fileName,
PDFParameter parameter)
Exports the current report to a pdf file with PDFParameter . |
boolean |
exportToPS(java.lang.String psFileName)
Deprecated. please use the method exportToPS(String, PSParameter) |
boolean |
exportToPS(java.lang.String psFileName,
boolean noMargin)
Deprecated. please use the method exportToPS(String, PSParameter) |
boolean |
exportToPS(java.lang.String psFileName,
PSParameter psParameter)
Exports the current report to ps file with the PSParameter . |
boolean |
exportToRtf(java.lang.String rtfFileName)
Deprecated. please use the method exportToPS(String, PSParameter) |
boolean |
exportToRtf(java.lang.String rtfFileName,
boolean noMargin)
Deprecated. please use the method exportToPS(String, PSParameter) |
boolean |
exportToRtf(java.lang.String rtfFileName,
RtfParameter rtfParameter)
Exports the current report to rtf file with the RtfParameter . |
boolean |
exportToText(java.lang.String textFileName,
boolean isNormalText)
Deprecated. please use the method exportToText(String, TextParameter) |
boolean |
exportToText(java.lang.String textFileName,
boolean isNormalText,
boolean isRepeat,
char delimiter)
Deprecated. please use the method exportToText(String, TextParameter) |
boolean |
exportToText(java.lang.String textFileName,
boolean isNormalText,
boolean isRepeat,
char delimiter,
boolean compress)
Deprecated. please use the method exportToText(String, TextParameter) |
boolean |
exportToText(java.lang.String textFileName,
boolean isNormalText,
boolean isRepeat,
char delimiter,
boolean compress,
boolean quoteMark)
Deprecated. please use the method exportToText(String, TextParameter) |
boolean |
exportToText(java.lang.String textFileName,
boolean isNormalText,
boolean isRepeat,
char delimiter,
int udchWidth,
int udchHeight,
boolean compress,
int resolution,
boolean quoteMark,
boolean hasHeadfoot)
Deprecated. please use the method exportToText(String, TextParameter) |
boolean |
exportToText(java.lang.String textFileName,
boolean isNormalText,
boolean isRepeat,
char delimiter,
int udchWidth,
int udchHeight,
boolean compress,
int resolution,
boolean quoteMark,
boolean hasHeadfoot,
boolean forWindows)
Deprecated. please use the method exportToText(String, TextParameter) |
boolean |
exportToText(java.lang.String textFileName,
boolean isNormalText,
boolean isRepeat,
char delimiter,
int udchWidth,
int udchHeight,
boolean compress,
int resolution,
boolean quoteMark,
boolean hasHeadfoot,
boolean forWindows,
boolean ignoreDelimiter)
Deprecated. please use the method exportToText(String, TextParameter) |
boolean |
exportToText(java.lang.String textFileName,
boolean isNormalText,
int udchWidth,
int udchHeight)
Deprecated. please use the method exportToText(String, TextParameter) |
boolean |
exportToText(java.lang.String textFileName,
boolean isNormalText,
int udchWidth,
int udchHeight,
boolean compress,
int resolution)
Deprecated. please use the method exportToText(String, TextParameter) |
boolean |
exportToText(java.lang.String textFileName,
boolean isNormalText,
int udchWidth,
int udchHeight,
boolean compress,
int resolution,
boolean quoteMark)
Deprecated. please use the method exportToText(String, TextParameter) |
boolean |
exportToText(java.lang.String textFileName,
TextParameter textParameter)
Exports to text file with the TextParameter . |
boolean |
exportToXls(java.lang.String xlsFileName)
Deprecated. please use the method exportToXls(String, ExcelParameter) |
boolean |
exportToXls(java.lang.String xlsFileName,
ExcelParameter excelParameter)
Exports to excel with the ExcelParameter . |
boolean |
exportToXls(java.lang.String xlsFileName,
int isWordWrap)
Deprecated. please use the method exportToXls(String, ExcelParameter). |
boolean |
exportToXls(java.lang.String xlsFileName,
int isWordWrap,
boolean isBiff8)
Deprecated. please use the method exportToXls(String, ExcelParameter) |
boolean |
exportToXls(java.lang.String xlsFileName,
int isWordWrap,
boolean isBiff8,
int param)
Deprecated. please use the method exportToXls(String, ExcelParameter) |
boolean |
exportToXML(java.lang.String xmlFileName,
boolean isDataOnly)
Deprecated. please use exportToXML(String, boolean, String) |
boolean |
exportToXML(java.lang.String xmlFileName,
boolean isMutibleFile,
boolean isDataOnly)
Deprecated. replaced by exportToXML(String, boolean, String) |
boolean |
exportToXML(java.lang.String xmlFileName,
boolean isDataOnly,
java.lang.String xsdFile)
Exports the current report to XML, the result of which is saved as a .xml file. |
java.lang.String |
firstPage()
Enables users to go to the first page of the report. |
java.util.Vector |
getAllHtmlFile()
Returns all html files that are generated by exportToHtml. |
static java.util.Vector |
getAllPrinters()
Gets all the printers in system. |
java.util.Vector |
getAllRtfFile()
Gets all the result files after exporting to rtf. |
java.util.Vector |
getAllXlsFile()
Gets all the result files after exporting to excel. |
java.util.Vector |
getAllXMLFile()
Gets all the result files after exporting to xml. |
int |
getCurrentPageNumber()
Gets the current page number of the report. |
java.lang.String |
getLoadReport()
|
java.awt.Dimension |
getMinimumSize()
Gets the minimum size, which means its width and high are both 0. |
int |
getPageOrientation()
Gets the page orientation. |
java.awt.Dimension |
getPreferredSize()
|
java.lang.String |
getPrintStatus()
Gets the print status after printing. |
java.lang.String |
getReportName()
Deprecated. from JReport V8, maybe return the value("") |
boolean |
getScrollbars()
Tells user there are scrollbars or not. |
java.lang.String |
getStatus()
Gets the status after an action. |
java.lang.String |
getTempPath()
Gets the temporary path. |
int |
getTotalPageNumber()
Gets the total page number of the report. |
int |
gotoPage(int pageNumber)
Enables users to go to the specified page of the report. |
boolean |
hasScrollbars()
Tells user there are scrollbars or not. |
boolean |
isShowButton()
Returns the status whether to show the buttons to turn page. |
boolean |
isZipStream(java.io.InputStream ins)
Judges whether user stream is compressed or not. |
java.lang.String |
lastPage()
Enables users to go to the last page of the report. |
java.lang.String |
nextPage()
Enables users to go to the next page of the report. |
java.lang.String |
prevPage()
Enables users to go to the previous page of the report. |
void |
printReport()
Prints the report with the Interactive format, not with In backGround format. |
void |
printReport(java.lang.Object job,
boolean bInteractive,
java.lang.Object pageFormat,
boolean bInBackground,
JReportPrintListener jreportprintlistener,
int useJDK,
java.lang.String jobName,
java.util.Vector attributeInfo,
java.lang.String printer)
Prints the report with the specified parameters. |
void |
printReport(java.lang.Object printJob,
java.lang.Object pageFormat,
boolean bInteractive,
boolean bInBackground,
boolean bUseJDK11)
Prints the report with the specified parameters. |
void |
printReport(java.lang.Object printJob,
java.lang.Object pageFormat,
boolean bInteractive,
boolean bInBackground,
boolean bUseJDK11,
boolean bSeparateLargePage)
|
void |
printReport(java.lang.Object printJob,
java.lang.Object pageFormat,
boolean bInteractive,
boolean bInBackground,
boolean bUseJDK11,
boolean bSeparateLargePage,
java.lang.String jobName)
|
void |
printReport(java.lang.Object printJob,
java.lang.Object pageFormat,
boolean bInteractive,
boolean bInBackground,
boolean bUseJDK11,
boolean bSeparateLargePage,
java.lang.String jobName,
java.lang.String printer)
Prints the report with special parameters. |
void |
printReportJDK14(boolean bInteractive,
boolean bInBackground,
JReportPrintListener jreportprintlistener,
java.lang.String jobName,
java.util.Vector attributeInfo,
java.util.Vector customMedias,
java.lang.String printer)
Prints the report with the specified parameters. |
void |
runReport()
Launches to run JReport Result Viewer Bean. |
java.lang.String |
saveAs()
Saves this report as a new result file. |
void |
setCommunicator(Communicator communicator)
Sets the communicator , which is a class defined by JReport. |
void |
setHomePath(java.lang.String homepath)
Sets home path. |
void |
setHtmlImageType(int imageType)
|
void |
setInputStream(java.io.InputStream ins,
boolean zip)
Sets the user input stream. |
void |
setLoadReport(java.lang.String loadReport)
Enables/disables to run the report. |
boolean |
setLogFile(java.lang.String fileName)
Sets the log file. |
void |
setPrintStatus()
Sets the print status before printing, which is used in printing background. |
void |
setReportName(java.lang.String reportName)
Sets the report name. |
void |
setScrollbars(boolean b)
Allows user to set scrollbars. |
void |
setShowButton(boolean bShowButton)
Sets the status whether to show the page turning buttons or not. |
void |
setShowInfoLevel(int level)
Enables/disables output error and debug message. |
void |
setTempPath(java.lang.String sTempPath)
Sets the temporary path. |
void |
zoom(int zoomRatio)
Zooms the report. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.event.AdjustmentListener |
---|
adjustmentValueChanged |
Methods inherited from interface jet.export.print.JReportPrintListener |
---|
printEnd, printStart |
Methods inherited from interface java.io.Externalizable |
---|
readExternal, writeExternal |
Methods inherited from interface java.awt.event.ActionListener |
---|
actionPerformed |
Field Detail |
---|
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 page turning buttons
will be displayed.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(jet.thinviewer.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
,
PORTRAIT
public void setCommunicator(Communicator communicator)
communicator
, which is a class defined by JReport.
After user sets the communicator
, the report viewer will load report
from this communicator
, not from the result file---rst.
communicator
- the communicator.JREngine.getReportCommunicator()
public boolean isShowButton()
show
the buttons to turn page.
show
the buttons and disabled
when it is falsepublic void setShowButton(boolean bShowButton)
show
the page turning 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. The
JDK 1.2 method can return you with a satisfactory result even for a gif file,
but it is slow in speed.
For example, you can call the printReport method like this:
PrinterJob printJob = PrinterJob.getPrinterJob();
bean.printReport(printJob, printJob.defaultPage(), false, false, false);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. The
JDK 1.2 method can return you with a satisfactory result even for a gif file,
but it is slow in speed.
For example, you can call the printReport method like this:
PrinterJob printJob = PrinterJob.getPrinterJob();
bean.printReport(printJob, printJob.defaultPage(), false, false, false);bSeparateLargePage
- a boolean value, if the report page size is larger
than the print paper size, and you want to separate the large report page
during printing, you should set this property to true. If the printing page size
you choose is smaller than the report page size, then the report will be
printed as multiple pages serially, which means we will seperate the large
pages of the report automatically.
As for JDK1.2 or higher versions, if you set the parameter to true, the page format dialog will
pop up. In this dialog, you can choose the page format you want
to print with, and JReport will use this page size for printing. For JDK1.1.x, however,
you must change the page format which you want to print with in the print
dialog(click the Property button, and then choose Page Format).jobName
- the print job nameprinter
- the printer
Note: This printing mothod is not recommended, as it may cause some unexpected errors. For example, you may get an extra blank page.
public void printReport(java.lang.Object job, boolean bInteractive, java.lang.Object pageFormat, boolean bInBackground, JReportPrintListener jreportprintlistener, int useJDK, java.lang.String jobName, java.util.Vector attributeInfo, java.lang.String printer) throws jet.export.print.NoSuchPrintAttributeException
job
- the print job of this print action. It is an instance of PrintJob or PrinterJob.
You can pass a PrinterJob or PrintJob object. If you set a null value, JReport will create a PrinterJob or PrintJob for your task.
A PrintJob object will be needed in JDK1.1 print method, or as for JDK1.2,JDK1.4 print method, a PrinterJob object will be needed.
If you pass a print job which is not a null value and set the parameter bInteractive as true,
information taken by printerjob would be reset by the values from the print set up dialog such as Copies,PrintService,JobName.bInteractive
- a boolean value, if you set it to true, JReport will present a print setup dialog to the user for changing the properties of the print job.
Otherwise the print setup dialog will not show up.pageFormat
- is a instance of PageFormat class, which describes the size and orientation of the page to be printed.
The pageFormat will take effect only with JDK1.1 or JDK1.2.
We recommend that you use attribute Info vector instead of the printFormat object with JDK1.4.bInBackground
- a boolean value, if you set it to false,
the printing progress dialog will show up with the printing progress bar in it.jreportprintlistener
- is the listener of print.
It is a interface which contains two methods which are printStart() and printEnd().
JeportPrintListener is located in jet.thinview.print package.
This interface is useful. It helps you to get the printing status -- start or end, for example. Otherwise, you can set it to null.useJDK
- a int value, if you set it to 0, it will use JDK1.1
to print the report. Otherwise if you set it to 1, it will use the JDK1.2
which you are running to print the report.if you set it to 2, it will use the JDK1.4
which you are running to print the report. The JDK 1.1 printing method is
quick in speed but the printing quality is not guaranteed. The
JDK 1.2 method can return you with a satisfactory result even for a gif file,
but it is slow in speed. JDK 1.4 provides more options to do printing, for example, to specify tray.jobName
- specifies print job name.attributeInfo
- is a vector whose elements are string.
Each String has defined in interface PrintConfig.
For example,you can implement PrintConfig and call its fields like this:
attributeInfo.add(TRAY_MANUAL);
attributeInfo.add(ORIENTATION_PORTRAIT);printer
- specifies the printer you want to use. This printer name must be with full path.
You can call getAllPrinters() method for jdk 1.4 to get the list of system printers.
This printReport method is recommended for jdk 1.4 or above versions only -- a lot of features are only supported by jdk 1.4 or above versions.
An example of calling this printReport() method:
PrinterJob printJob = PrinterJob.getPrinterJob();
Vector attributeInfo = new Vector();
attributeInfo.add(TRAY_MANUAL);
attributeInfo.add(ORIENTATION_PORTRAIT);
bean.printReport(printJob, true,printJob.defaultPage(),
false,null,2,"JReport",
attributeInfo,"\\\\192.168.128.111\\Samsung SCX-5x12 Series PCL 6");
jet.export.print.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 jet.export.print.NoSuchPrintAttributeException
bInteractive
- a boolean value, if you set it to true, a print setup dialog will be presented to the user for changing the properties of the print job.
Otherwise the print setup dialog will not show up.bInBackground
- a boolean value, if you set it to false,
show the printing progress dialog with printing progress bar in it.jreportprintlistener
- is the listener of print.
It is a interface which contains two methods: printStart() and printEnd().
This interface is useful. It helps you to get the print status -- start or end, for example. Otherwise, you can set it to null.jobName
- specifies the print job name.attributeInfo
- is a vector whose elements are string.
Each String has defined in interface PrintConfig.
For example,you can implement PrintConfig and call its fields like this:
attributeInfo.add(TRAY_MANUAL);
attributeInfo.add(ORIENTATION_PORTRAIT);customMedias
- is a vector whose elements are some instance of CustomMedia.
Until now, JReport provides the following CustomMedia: CustomMediaCopies,CustomMediaMargin,CustomMediaTray.
CustomMediaCopies indicates printed copies.
CustomMediaMargin indicates page margin when printing. You may create an instance of CustomMediaMargin which includes four values representing left, right, top and bottom margin.
CustomMediaTray indicates special tray which is not the standard tray defined in java.
If you want to specify a special tray, you must specify a printer name. Otherwise JReport will find this tray in default printer. If the specified printer has not such a tray, it would throw a NoSuchPrintAttributeException.
If needed, you may get all media tray's names in a special printer by calling getAllMediaTray(String printerName).
You may create an instance of customMedias as showed below:
Vector customMedias = new Vector();
customMedias.add();
customMedias.add(new CustomMediaCopies(2));
customMedias.add(new CustomMediaMargin(10f, 12f, 10f, 15f,CustomMediaMargin.MM));
customMedias.add(new CustomMediaMargin(0.8f, 1f, 1.5f, 0.8f,CustomMediaMargin.INCH));
customMedias.add(new CustomMediaTray("Multi-Purpose Tray"));printer
- specify the printer you want to use. This printer name must be with full path.
You can call getAllPrinters() method for jdk 1.4 to get the list of system printers.
This printReportJDK14 method is only for jdk 1.4 or above versions.
An example of calling this printReportJDK14() method:
PrinterJob job = PrinterJob.getPrinterJob();
Vector attributeInfo = new Vector();
attributeInfo.add(PrintConfig.ORIENTATION_LANDSCAPE);
Vector customMedias = new Vector();
customMedias.add(new CustomMediaCopies(2));
customMedias.add(new CustomMediaMargin(0.8f, 1f, 1.5f, 2f,CustomMediaMargin.INCH));
customMedias.add(new CustomMediaTray("Multi-Purpose Tray"));
try
{
bean.printReportJDK14(true,false,null,"jobname", attributeInfo,customMedias,"\\\\192.168.128.111\\Samsung SCX-5x12 Series PCL 6");
}catch(NoSuchPrintAttributeException ec)
{
System.out.println(ec);
}
jet.export.print.NoSuchPrintAttributeException
- if these parameters in attributeInfo or customMedias are not supported, or
if the JDK version is under JDK 1.4.0.PrintConfig
,
CustomMediaCopies
,
CustomMediaMargin
,
CustomMediaTray
,
CustomJobPriority
,
CustomMediaPaper
,
CustomPageRanges
,
CustomToFile
,
CustomUserName
,
CustomJobName
public static java.util.Vector getAllPrinters()
public java.lang.String getPrintStatus()
public void setPrintStatus()
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class javax.swing.JComponent
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public 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 files.bHyperlink
- indicates whether to generate a hyperlink.bPageNum
- indicates whether to generate page numbers.bAbsolute
- indicates the whether the font size is absolute or relative.iBrowser
- indicates whether the browser is IE or NETSCAPE. The value of
parameter int browser must be IE or NETSCAPE.
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 files.bHyperlink
- indicates whether to generate a hyperlink.bPageNum
- indicates whether to generate page numbers.bAbsolute
- indicates whether the font size is absolute or relative.iBrowser
- indicates whether the browser is IE or NETSCAPE. The value of
parameter int browser must be IE or NETSCAPE.bincdrilldownfile
- indicates the drilldown html files were included in file list
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 files.bHyperlink
- indicates whether to generate a hyperlink.bPageNum
- indicates whether to generate page numbers.bAbsolute
- indicates whether the font size is absolute or relative.iBrowser
- indicates whether the browser is IE or NETSCAPE. The value of
parameter int browser must be IE or NETSCAPE.bincdrilldownfile
- specifies to generate the drilldown html files
in the file list.noMargin
- specifies to generate the html files without page margin.
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 files.bHyperlink
- indicates whether to generate a hyperlink.bPageNum
- indicates whether to generate page numbers.bAbsolute
- indicates whether the font size is absolute or relative.iBrowser
- indicates whether the browser is IE or NETSCAPE. The value of
parameter int browser must be IE or NETSCAPE.bincdrilldownfile
- specifies to generate the drilldown html files
in the file list.noMargin
- specifies to generate the html files without page margin.resolution
- indicates the resolution of the html files
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 files.bHyperlink
- indicates whether to generate a hyperlink.bPageNum
- indicates whether to generate page numbers.bAbsolute
- indicates whether the font size is absolute or relative.iBrowser
- indicates whether the browser is IE or NETSCAPE. The value of
parameter int browser must be IE or NETSCAPE.bincdrilldownfile
- specifies to generate the drilldown html files
in the file list.noMargin
- specifies to generate the html files without page Margin.
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 files.bHyperlink
- indicates whether to generate a hyperlink.bPageNum
- indicates whether to generate page numbers.bAbsolute
- indicates whether the font size is absolute or relative.iBrowser
- indicates whether the browser is IE or NETSCAPE. The value of
parameter int browser must be IE or NETSCAPE.
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 files.bHyperlink
- indicates whether to generate a hyperlink.bPageNum
- indicates whether to generate page numbers.bAbsolute
- indicates whether the font size is absolute or relative.iBrowser
- indicates whether the browser is IE or NETSCAPE. The value of
parameter int browser must be IE or NETSCAPE.bincdrilldownfile
- indicates that the drilldown html files were included in file list.
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 files.bHyperlink
- indicates whether to generate a hyperlink.bPageNum
- indicates whether to generate page numbers.bAbsolute
- indicates whether the font size is absolute or relative.iBrowser
- indicates whether the browser is IE or NETSCAPE. The value of
the parameter iBrowser must be bincdrilldownfile
- indicates that 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 files.bHyperlink
- indicates whether to generate a hyperlink.bPageNum
- indicates whether to generate page numbers.bAbsolute
- indicates whether the font size is absolute or relative.iBrowser
- indicates whether the browser is IE or NETSCAPE. The value of
the parameter iBrowser must be bincdrilldownfile
- indicates that the drilldown html files were included in file list.noMargin
- specifies to generate the html files without page margin.resolution
- indicates the resolution of the html files.
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
- specifies 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
- specifies to generate the pdf file without page margin.isSimPrintMode
- specifies to generate the pdf file using the 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
- specifies to generate the pdf file without page margin.isSimPrintMode
- specifies to generate the pdf file using simulated print mode.isCompressImage
- specifies to generate the pdf file with compressed image.
exportToPdf(String, PDFParameter)
public boolean exportToPdf(java.lang.String pdfFileName, boolean noMargin, boolean isSimPrintMode, int isCompressImage, boolean isTransparent)
pdfFileName
- the PDF file name.noMargin
- specifies to generate the pdf file without page margin.isSimPrintMode
- specifies to generate the pdf file using simulated print mode.isCompressImage
- specifies the image compress rate to generate the pdf file.isTransparent
- specifies to generate the pdf file with transparent gif image.
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
- specifies to generate the pdf file without page margin.isSimPrintMode
- specifies to generate the pdf file using simulated print mode.isCompressImage
- indicatess the image compress rate to generate the pdf file.isTransparent
- specifies to generate the pdf file with transparent gif image.bToc
- specifies to generate the pdf file with TOC.bDrill
- specifies to generate the pdf file with drill down.
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
- specifies to generate the pdf file without page margin.isSimPrintMode
- specifies to generate the pdf file using simulated print mode.isCompressImage
- specifies the image compress rate to generate the pdf file.isTransparent
- specifies to generate the pdf file with transparent gif image.bToc
- specifies to generate the pdf file with TOC.bDrill
- specifies to generate the pdf file with drill down.
exportToPdf(String, PDFParameter)
public boolean exportToPdf(java.lang.String fileName, PDFParameter parameter)
PDFParameter
.
parameter
- specifies to generate the pdf file with the all pdf parameters.fileName
- the name of the exporting result file
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 in which each row represents one 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 in which each row represents a record in the report. It can be used as a text datasource to exchange data with other applications.
udchWidth
- the width of user defined characters.udchHeight
- the height of user defined characters.
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 in which each row represents a record in the report. It can be used as a text datasource to exchange data with other applications.
udchWidth
- the width of user defined characters.udchHeight
- the height of user defined characters.compress
- removes empty lines in the exported text file.resolution
- sets resolution when export to text.
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 in normal text format
or standard data format.
The standard data format text file is the text file in which each row represents a record in the report. It can be used as a text datasource to exchange data with other applications.
isRepeat
- indicates whether to repeat the same contents.delimiter
- delimiter is used in SDF(Standard Data Format) format.
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 in normal text format
or standard data format.
The standard data format text file is the text file in which each row represents one record in the report. It can be used as a text datasource to exchange data with other applications.
isRepeat
- indicates whether to repeat the same contents.delimiter
- delimiter is used in SDF(Standard Data Format) format.compress
- removes empty lines or redundant delimiters in the exported text file.
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 in normal text format
or standard data format
The standard data format text file is the text file in which each row represents one record in the report. It can be used as a text datasource to exchange data with other applications.
isRepeat
- indicates whether to repeat the same contents.delimiter
- delimiter is used in SDF(Standard Data Format) format.compress
- removes empty lines or redundant delimiters in the exported text file.quoteMark
- use quoteMark or not
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 in which each row represents one record in the report. It can be used as a text datasource to exchange data with other applications.
udchWidth
- the width of user defined characters.udchHeight
- the height of user defined characters.compress
- removes empty lines in the exported text file.resolution
- sets resolution when exporting to text.
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 in normal text format
or standard data format.
The standard data format text file is the text file in which each row represents one record in the report. It can be used as a text datasource to exchange data with other applications.
isRepeat
- indicates whether to repeat the same contents.delimiter
- delimiter is used in SDF(Standard Data Format) format.udchWidth
- the width of user defined characters.udchHeight
- the height of user defined characters.compress
- removes empty lines or redundant delimiters in the exported text file.resolution
- defines the resolution by which the character will be converted.quoteMark
- keeps the quote character in standard format text.forWindows
- to indicate the platform on which the text file will be accessed.
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 in normal text format
or standard data format.
The standard data format text file is the text file in which each row represents one record in the report. It can be used as a text datasource to exchange data with other applications.
isRepeat
- indicates whether to repeat the same contents.delimiter
- delimiter is used in SDF(Standard Data Format) format.udchWidth
- the width of user defined characters.udchHeight
- the height of user defined characters.compress
- removes empty lines or redundant delimiters in the exported text file.resolution
- defines the resolution by which the character will be converted.quoteMark
- keeps the quote character in standard format text.forWindows
- to indicate the platform on which the text file will be accessed.ignoreDelimiter
- ignores the delimiter
exportToText(String, TextParameter)
public boolean exportToText(java.lang.String textFileName, TextParameter textParameter)
TextParameter
.
textFileName
- the exported result file name.textParameter
- holds all needed parameters for exporting to text file.
TextParameter
public 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,
- specifies to export to a PS file without page margin.
exportToPS(String, PSParameter)
public boolean exportToPS(java.lang.String psFileName, PSParameter psParameter)
PSParameter
.
psFileName
- the exporing result file name.psParameter
- holds the needed parameters for exporting to ps.
PSParameter
public 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,
- specifies to export to Rtf file without page margin.
exportToPS(String, PSParameter)
public boolean exportToRtf(java.lang.String rtfFileName, RtfParameter rtfParameter)
RtfParameter
.
rtfFileName
- the exported result file name.rtfParameter
- holds all needed parameters for exporting to rtf file.
RtfParameter
public 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, which includes the file path.isWordWrap
- the word wrap type. KEEPORIGIN is to keep the original word wrap.
NOWORDWRAP means no word wrap and WORDWRAPALL means word wrap all.isBiff8
- the flag whether to export to excel 2000.param
- the flag whether to export the shape to excel file. When isBiff8 is set to true, the flag will not
take effect on the excel file, becaue excel 2000 does not support the shape exporting. NOEXPORTSHAPE means
that you can not export the shape to excel file and EXPORTSHAPE means that you can export the shape to excel file.
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 file name of the exported result file.excelParameter
- holds the parameters needed for exporting to excel.
ExcelParameter
public 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 on which the exporting to xml is based. If you set it to null, JReport will 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 engines are finised, you 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 |