|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IReportPrinter
Method Summary | |
---|---|
void |
addPrintProgressListener(IPrintProgressListener listener)
Adds the given PrintProgressListener to the list of registered progress listeners. |
void |
cancel()
Cancels the printing of the report. |
ConnectionInfos |
getDatabaseLogOnInfos()
Returns the database logon requirements from the IReportSource . |
PrinterDuplex |
getDuplex()
Returns whether this ReportPrinter will use one or both sides of the paper. |
java.lang.String |
getJobTitle()
Returns the title this ReportPrinter will use for the print job. |
java.util.Locale |
getLocale()
Returns the locale for this ReportPrinter . |
int |
getNCopies()
Returns the number of copies of the report this ReportPrinter will print. |
PrintReportOptions.PageRange[] |
getPageRangeLimits()
Returns the page ranges from the report that this ReportPrinter will print. |
PaperSize |
getPaperSize()
Returns the size of the paper this ReportPrinter will use. |
PaperSource |
getPaperSource()
Returns which paper source (tray or manual feed, for instance) this ReportPrinter
will use. |
Fields<IParameterField> |
getParameterFields()
Returns the parameter field value requirements from the IReportSource . |
java.lang.String |
getPrinterName()
Returns the name of the printer to be used by this ReportPrinter . |
IReportSource |
getReportSource()
Returns the report source for this ReportPrinter . |
java.lang.String |
getSelectionFormula()
Returns the record selection formula from the IReportSource . |
java.lang.String |
getViewTimeSelectionFormula()
Returns the view-time selection formula from the IReportSource . |
boolean |
isCollated()
Returns whether multiple copies of the report will be collated by this ReportPrinter . |
void |
print()
Prints the report using whatever options have been specified earlier. |
void |
print(java.awt.print.PrinterJob job)
Prints the report using the specified PrinterJob . |
void |
print(PrintReportOptions options)
Prints the report using the specified PrintReportOptions . |
void |
removeAllPrintProgressListeners()
Removes all print progress listeners. |
void |
removePrintProgressListener(IPrintProgressListener listener)
Removes the given PrintProgressListener from the list of registered progress listeners. |
void |
setCollated(boolean collated)
Sets whether multiple copies of the report will be collated by this ReportPrinter . |
void |
setContexts(java.util.List<IRequestContext> contexts)
Sets a list of contexts that need to be printed. |
void |
setDatabaseLogOnInfos(ConnectionInfos logons)
Sets the database logon information for the IReportSource . |
void |
setDuplex(PrinterDuplex duplex)
Sets whether this ReportPrinter will use one or both sides of the paper. |
void |
setJobTitle(java.lang.String jobTitle)
Sets the title this ReportPrinter will use for the print job. |
void |
setLocale(java.util.Locale locale)
Sets the locale for this ReportPrinter . |
void |
setNCopies(int nCopies)
Sets the number of copies of the report this ReportPrinter will print. |
void |
setPageRangeLimits(PrintReportOptions.PageRange pageRange)
Sets the page range from the report that this ReportPrinter will print. |
void |
setPageRangeLimits(PrintReportOptions.PageRange[] pageRanges)
Sets the page ranges from the report that this ReportPrinter will print. |
void |
setPaperSize(PaperSize paperSize)
Sets the size of the paper this ReportPrinter will use. |
void |
setPaperSource(PaperSource paperSource)
Sets which paper source (tray or manual feed, for instance) this ReportPrinter
will use. |
void |
setParameterFields(Fields<IParameterField> parameters)
Sets the parameter field values for the IReportSource . |
void |
setPrinterName(java.lang.String printerName)
Sets which printer this ReportPrinter will use. |
void |
setReportSource(IReportSource reportSource)
Sets the report source for this ReportPrinter . |
void |
setSelectionFormula(java.lang.String formulaText)
Sets the record selection formula for the IReportSource . |
void |
setViewTimeSelectionFormula(java.lang.String formulaText)
Sets the view-time selection formula for the IReportSource . |
Method Detail |
---|
IReportSource getReportSource()
ReportPrinter
.
void setReportSource(IReportSource reportSource)
ReportPrinter
.
The report source must be set before the print
method is called.
reportSource
- java.lang.String getPrinterName()
ReportPrinter
.
If null, the default printer will be used.
void setPrinterName(java.lang.String printerName) throws ReportSDKPrinterException
ReportPrinter
will use.
Printer names are platform-dependent.
This method requires Java 1.4 or later.
printerName
- the name of the printer to use, or null to use the default printer.
ReportSDKPrinterJVMException
- if used with Java 1.3.
ReportSDKPrinterNotFoundException
- if no printer with the given name can be found.
ReportSDKPrinterException
- if anything else goes wrong.int getNCopies()
ReportPrinter
will print.
void setNCopies(int nCopies)
ReportPrinter
will print.
nCopies
- at least 1.
java.lang.IllegalArgumentException
- if nCopies
is less than 1.boolean isCollated()
ReportPrinter
.
void setCollated(boolean collated) throws ReportSDKPrinterException
ReportPrinter
.
This method requires Java 1.4 or later.
collated
-
ReportSDKPrinterJVMException
- if used with Java 1.3.
ReportSDKPrinterException
PrinterDuplex getDuplex()
ReportPrinter
will use one or both sides of the paper.
void setDuplex(PrinterDuplex duplex) throws ReportSDKPrinterException
ReportPrinter
will use one or both sides of the paper.
This method requires Java 1.4 or later.
duplex
-
java.lang.NullPointerException
- if duplex
is null.
ReportSDKPrinterJVMException
- if used with Java 1.3.
ReportSDKPrinterException
PaperSize getPaperSize()
ReportPrinter
will use.
void setPaperSize(PaperSize paperSize) throws ReportSDKPrinterException
ReportPrinter
will use.
This method requires Java 1.4 or later.
paperSize
-
java.lang.NullPointerException
- if paperSize
is null.
ReportSDKPrinterJVMException
- if used with Java 1.3.
ReportSDKPrinterPaperSizeException
- if the paper size has no corresponding javax.print.attribute.standard.MediaSizeName
.
ReportSDKPrinterException
PaperSource getPaperSource()
ReportPrinter
will use.
void setPaperSource(PaperSource paperSource) throws ReportSDKPrinterException
ReportPrinter
will use.
This method requires Java 1.4 or later.
paperSource
-
java.lang.NullPointerException
- if paperSource
is null.
ReportSDKPrinterJVMException
- if used with Java 1.3.
ReportSDKPrinterPaperSourceException
- if the paper size has no corresponding javax.print.attribute.standard.MediaTray
.
ReportSDKPrinterException
PrintReportOptions.PageRange[] getPageRangeLimits()
ReportPrinter
will print.
void setPageRangeLimits(PrintReportOptions.PageRange[] pageRanges) throws ReportSDKPrinterException
ReportPrinter
will print.
If pageRanges
is null or an empty array, all pages will be printed.
A zero starting page number is equivalent to 1.
A zero ending page number is equivalent to Integer.MAX_VALUE
.
This method requires Java 1.4 or later.
pageRanges
- an array of PrintReportOptions.PageRange
s, or null.
ReportSDKPrinterJVMException
- if used with Java 1.3.
java.lang.IllegalArgumentException
- if a starting or ending page number is less than zero or if a starting page number is bigger than the ending page number.
ReportSDKPrinterException
void setPageRangeLimits(PrintReportOptions.PageRange pageRange) throws ReportSDKPrinterException
ReportPrinter
will print.
If pageRange
is null, all pages will be printed.
A zero starting page number is equivalent to 1.
A zero ending page number is equivalent to Integer.MAX_VALUE
.
This method requires Java 1.4 or later.
pageRange
- a PrintReportOptions.PageRange
, or null.
ReportSDKPrinterJVMException
- if used with Java 1.3.
java.lang.IllegalArgumentException
- if the starting or ending page number is less than zero or if the starting page number is bigger than the ending page number.
ReportSDKPrinterException
java.lang.String getJobTitle()
ReportPrinter
will use for the print job.
void setJobTitle(java.lang.String jobTitle)
ReportPrinter
will use for the print job.
jobTitle
- ConnectionInfos getDatabaseLogOnInfos() throws ReportSDKExceptionBase
IReportSource
.
ReportSDKExceptionBase
- if the database logon requirements can't be retrieved.void setDatabaseLogOnInfos(ConnectionInfos logons)
IReportSource
.
logons
- database logon information.
java.lang.IllegalStateException
- if the report source has not been set.Fields<IParameterField> getParameterFields() throws ReportSDKExceptionBase
IReportSource
.
ReportSDKExceptionBase
- if the parameter field value requirements can't be retrieved.void setParameterFields(Fields<IParameterField> parameters)
IReportSource
.
parameters
- parameter field values.
java.lang.IllegalStateException
- if the report source has not been set.java.lang.String getSelectionFormula()
IReportSource
.
void setSelectionFormula(java.lang.String formulaText)
IReportSource
.
formulaText
- record selection formula.
java.lang.IllegalStateException
- if the report source has not been set.java.lang.String getViewTimeSelectionFormula()
IReportSource
.
void setViewTimeSelectionFormula(java.lang.String formulaText)
IReportSource
.
formulaText
- view-time selection formula.
java.lang.IllegalStateException
- if the report source has not been set.java.util.Locale getLocale()
ReportPrinter
.
void setLocale(java.util.Locale locale)
ReportPrinter
.
locale
-
java.lang.NullPointerException
- if locale
is null.void addPrintProgressListener(IPrintProgressListener listener)
PrintProgressListener
to the list of registered progress listeners.
listener
- the print progress listener to add.void removePrintProgressListener(IPrintProgressListener listener)
PrintProgressListener
from the list of registered progress listeners.
listener
- the print progress listener to remove.void removeAllPrintProgressListeners()
void print() throws ReportSDKExceptionBase
java.lang.IllegalStateException
- if the report source has not yet been set.
ReportSDKExceptionBase
- if anything goes wrong.void print(PrintReportOptions options) throws ReportSDKExceptionBase
PrintReportOptions
.
At a minimum, the report source must be set before this method is called.
Note: The paper orientation specified by options
is ignored.
The orientation defined in the report itself is always used instead.
Some of the PrintReportOptions
values require Java 1.4 or later.
options
- the print options to use.
java.lang.IllegalStateException
- if the report source has not yet been set.
ReportSDKPrinterJVMException
- if used with Java 1.3 and printer name, collation, duplex, paper size, paper source, or page ranges are specified with values other than the defaults.
ReportSDKExceptionBase
- if anything goes wrong.void print(java.awt.print.PrinterJob job) throws ReportSDKExceptionBase
PrinterJob
.
At a minimum, the report source must be set before this method is called.
job
- the printer job to use.
java.lang.IllegalStateException
- if the report source has not yet been set.
ReportSDKExceptionBase
- if anything goes wrong.void cancel() throws ReportSDKExceptionBase
ReportSDKExceptionBase
- if anything goes wrong.void setContexts(java.util.List<IRequestContext> contexts)
contexts
- the contexts to print, null for main report.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |