com.crystaldecisions.sdk.occa.report.document
Class PrintReportOptions

java.lang.Object
  extended by com.crystaldecisions.sdk.occa.report.document.PrintReportOptions

public class PrintReportOptions
extends java.lang.Object

This object provides access to the server-side printing options in the RAS SDK that are available for a report. Server-side printing is available on the server where the RAS SDK is installed.

Printer options are applied in the following order:

Note: Print report options are not saved with the report.


Nested Class Summary
static class PrintReportOptions.PageRange
          Use this class to specify a printer page range.
 
Constructor Summary
PrintReportOptions()
           
 
Method Summary
 void addPrinterPageRange(PrintReportOptions.PageRange pageRange)
           Adds a range of pages to be printed.
 boolean getCollated()
           Returns true if the printed pages are collated, and false otherwise.
 java.lang.String getJobTitle()
           Gets the job title of the print job.
 javax.print.attribute.standard.MediaTray getMediaTray()
           Returns MediaTray object if the printer has selected tray, null otherwise.
 PrintReportOptions.PageRange getNthPrinterPageRange(int idx)
           Gets the the specified printer page range.
 int getNumberOfCopies()
           Gets the number of copies of the report to be printed.
 PaperSize getPaperSize()
           Gets the paper size.
 PaperSource getPaperSource()
           Gets the paper source.
 PrinterDuplex getPrinterDuplex()
           Gets the duplex mode for the print job.
 java.lang.String getPrinterName()
           Gets the printer name.
 int getPrinterPageRangeCount()
           Gets the number of printer page ranges.
 void removeAllPrinterPageRanges()
           Removes all page ranges for this instance of the PrintReportOptions object.
 void removeNthPrinterPageRange(int idx)
           Removes the specified page range.
 void setCollated(boolean collated_)
           Sets whether the printed pages are collated.
 void setJobTitle(java.lang.String jobTitle)
           Sets the title of the print job.
 void setMediaTray(javax.print.attribute.standard.MediaTray selectedTray_)
           Sets selected tray.
 void setNumberOfCopies(int numberOfCopies_)
           Sets the number of copies of the report to be printed.
 void setPaperSize(PaperSize size)
           Sets the paper size.
 void setPaperSource(PaperSource source)
           Sets the paper source.
 void setPrinterDuplex(PrinterDuplex duplex)
           Sets the duplex mode for the print job.
 void setPrinterName(java.lang.String printerName)
           Sets the printer name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintReportOptions

public PrintReportOptions()
Method Detail

getPrinterName

public java.lang.String getPrinterName()

Gets the printer name.

Returns:
a String object that specifies the printer name.

setPrinterName

public void setPrinterName(java.lang.String printerName)

Sets the printer name.

Parameters:
printerName - a String object that specifies the name of the printer to be set.

getPaperSize

public PaperSize getPaperSize()

Gets the paper size.

Returns:
a reference to the PaperSize object

setPaperSize

public void setPaperSize(PaperSize size)

Sets the paper size.

Parameters:
size - the PaperSize object whose properties will be set.

getPaperSource

public PaperSource getPaperSource()

Gets the paper source.

Returns:
a reference to the PaperSource object

setPaperSource

public void setPaperSource(PaperSource source)

Sets the paper source.

Parameters:
source - the PaperSource object whose properties will be set.

getPrinterDuplex

public PrinterDuplex getPrinterDuplex()

Gets the duplex mode for the print job.

Returns:
a reference to the PrinterDuplex object.

setPrinterDuplex

public void setPrinterDuplex(PrinterDuplex duplex)

Sets the duplex mode for the print job.

Parameters:
duplex - the PrinterDuplex object whose properties will be set.

getJobTitle

public java.lang.String getJobTitle()

Gets the job title of the print job.

Returns:
a String object that represents the job title.

setJobTitle

public void setJobTitle(java.lang.String jobTitle)

Sets the title of the print job.

If this property is not set, the printer will provide a default job title.

Parameters:
jobTitle - the a String object that specifies the title of the print job to be set.

getPrinterPageRangeCount

public int getPrinterPageRangeCount()

Gets the number of printer page ranges.

Returns:
an int that specifies the number of page ranges for this instance of the PrintReportOptions object.

getNthPrinterPageRange

public PrintReportOptions.PageRange getNthPrinterPageRange(int idx)

Gets the the specified printer page range.

This method allows you to access one of the printer page ranges that have been added to the PrintReportOptions object. See the addPrinterPageRange method for details.

Parameters:
idx - an int that specifies the zero-based index of the page range to be accessed.
Returns:
the PageRange object specified by the index.

addPrinterPageRange

public void addPrinterPageRange(PrintReportOptions.PageRange pageRange)

Adds a range of pages to be printed.

You can add multiple printer page ranges to a PrintReportOptions object. For example, if you want to print pages 1-2, 4-6, and 7-9, you can add multiple page ranges to the object by calling the addPrinterPageRange for each page range. Each page range will be added in sequence using a zero-based index.

To access any of the printer page ranges, pass in the index to the getNthPrinterPageRange method or the removeNthPrinterPageRange method.

Parameters:
pageRange - the PageRange to be added.

removeNthPrinterPageRange

public void removeNthPrinterPageRange(int idx)

Removes the specified page range.

This method allows you to access one of the printer page ranges that have been added to the PrintReportOptions object. See the addPrinterPageRange method for details.

Parameters:
idx - an int that specifies zero-based index of the PageRange object to be removed.

removeAllPrinterPageRanges

public void removeAllPrinterPageRanges()

Removes all page ranges for this instance of the PrintReportOptions object.


getNumberOfCopies

public int getNumberOfCopies()

Gets the number of copies of the report to be printed.

Returns:
the number of copies of the report to be printed.

setNumberOfCopies

public void setNumberOfCopies(int numberOfCopies_)

Sets the number of copies of the report to be printed.

Parameters:
numberOfCopies_ - an int that specifies the number of copies of the report to be printed

getCollated

public boolean getCollated()

Returns true if the printed pages are collated, and false otherwise.

Returns:
true if the printed pages are collated, and false otherwise.

setCollated

public void setCollated(boolean collated_)

Sets whether the printed pages are collated.

Parameters:
collated_ - true if the printed pages are collated, and false otherwise.

getMediaTray

public javax.print.attribute.standard.MediaTray getMediaTray()

Returns MediaTray object if the printer has selected tray, null otherwise.

Returns:
MediaTray object if the printer has selected tray, null otherwise.

setMediaTray

public void setMediaTray(javax.print.attribute.standard.MediaTray selectedTray_)

Sets selected tray.

Parameters:
selectedTray_ - MediaTray object.