com.crystaldecisions.reports.sdk
Class ReportClientDocument

java.lang.Object
  |
  +--com.crystaldecisions.reports.sdk.ReportClientDocument
All Implemented Interfaces:
IReportClientDocument

public class ReportClientDocument
extends java.lang.Object
implements IReportClientDocument

A document object that represents a report.


Constructor Summary
ReportClientDocument()
          Creates a new report client document.
 
Method Summary
 void close()
          Closes the report client document.
 DatabaseController getDatabaseController()
          Retrieves the database controller for the document.
 DataDefController getDataDefController()
          Returns the data definition controller for the document.
 PrintOutputController getPrintOutputController()
          Returns the PrintOutputController object used to export this document to a different format.
 java.lang.String getRecordSelectionFormula()
          Gets the record selection formula for this report.
 IReportSource getReportSource()
          Returns a report source based on the current report document.
 SubreportController getSubreportController()
          Retrieves the subreport controller for the document.
 boolean isOpen()
          Returns true if the report client document is currently open.
 void open(java.lang.Object documentPath, int options)
          Opens a report specified by documentPath.
 void saveAs(java.lang.String displayName, java.lang.Object parentFolderPath, int options)
           Saves the changes to a new report.
 void setLocale(java.util.Locale locale)
          Sets the locale for this report.
 void setRecordSelectionFormula(java.lang.String formulaText)
          Sets the record selection formula for this report.
 void verifyDatabase()
          Verifies all the datasources used in this report.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportClientDocument

public ReportClientDocument()
Creates a new report client document.

Method Detail

open

public void open(java.lang.Object documentPath,
                 int options)
          throws ReportSDKException
Opens a report specified by documentPath.

Parameters:
documentPath - - One of the following:
1. A string representing the URI for a report (.rpt) file
2. A property bag containing such a string.

options - - This argument is currently ignored. All reports are opened as read-only
Throws:
ReportSDKException - if the document failed to open
java.lang.IllegalArgumentException - if documentPath is not a valid object

close

public void close()
           throws ReportSDKException
Closes the report client document.

Throws:
ReportSDKException

saveAs

public void saveAs(java.lang.String displayName,
                   java.lang.Object parentFolderPath,
                   int options)
            throws ReportSDKException,
                   java.io.IOException

Saves the changes to a new report.

ReportSDKException
java.io.IOException

getDatabaseController

public DatabaseController getDatabaseController()
                                         throws ReportSDKException
Retrieves the database controller for the document.

Specified by:
getDatabaseController in interface IReportClientDocument
Returns:
a DatabaseController object
Throws:
ReportSDKException

getReportSource

public IReportSource getReportSource()
Returns a report source based on the current report document.

Returns:
an IReportSource object or null if the report source could not be retrieved

isOpen

public boolean isOpen()
               throws ReportSDKException
Returns true if the report client document is currently open.

Returns:
boolean true if the report client document is open or false if it is currently closed
Throws:
ReportSDKException

setLocale

public void setLocale(java.util.Locale locale)
               throws ReportSDKException
Sets the locale for this report. The locale must be set before this report client document is opened.

Parameters:
locale -
Throws:
ReportSDKException - if the report client document is already open

getDataDefController

public DataDefController getDataDefController()
                                       throws ReportSDKException
Returns the data definition controller for the document.

Specified by:
getDataDefController in interface IReportClientDocument
Returns:
DataDefController
Throws:
ReportSDKException

getSubreportController

public SubreportController getSubreportController()
                                           throws ReportSDKException
Retrieves the subreport controller for the document.

Throws:
ReportSDKException

getPrintOutputController

public PrintOutputController getPrintOutputController()
Returns the PrintOutputController object used to export this document to a different format.

Returns:
The PrintOutputController object used to export this document to a different format.

verifyDatabase

public void verifyDatabase()
                    throws ReportSDKException
Verifies all the datasources used in this report. This includes the main report and the subreports.

Throws:
ReportSDKException

getRecordSelectionFormula

public java.lang.String getRecordSelectionFormula()
                                           throws ReportSDKException
Description copied from interface: IReportClientDocument
Gets the record selection formula for this report.

Specified by:
getRecordSelectionFormula in interface IReportClientDocument
Returns:
The record selection formula as a String
ReportSDKException

setRecordSelectionFormula

public void setRecordSelectionFormula(java.lang.String formulaText)
                               throws ReportSDKException
Description copied from interface: IReportClientDocument
Sets the record selection formula for this report.

Specified by:
setRecordSelectionFormula in interface IReportClientDocument
Parameters:
formulaText - The record selection formula for this report.
ReportSDKException