com.crystaldecisions.reports.sdk
Class ReportClientDocument

java.lang.Object
  extended bycom.crystaldecisions.reports.sdk.ReportClientDocument

public class ReportClientDocument
extends java.lang.Object

Provides access to a report's properties.


Constructor Summary
ReportClientDocument()
           
 
Method Summary
 void close()
          Closes the ReportClientDocument and releases all resources.
 DatabaseController getDatabaseController()
          Returns the DatabaseController object that is used to access the tables that are used as the report's data source.
 IReportSource getReportSource()
          Returns the ReportSource object used by the viewer to display the contents of the report.
 SubreportController getSubreportController()
          Returns the SubreportController object used to determine the names of the subreports in the report and to modify the subreports' databases.
 void open(java.lang.Object documentPath, int options)
          Opens a report.
 void setLocale(java.util.Locale locale)
          Sets the locale that is used to localize various aspects of the document.
 void verifyDatabase()
           Checks to ensure that the report is using the most current data scheme from its database.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportClientDocument

public ReportClientDocument()
Method Detail

open

public void open(java.lang.Object documentPath,
                 int options)
          throws ReportSDKException

Opens a report.

Parameters:
documentPath - Specifies the report to open. Can be one of: a String representing the URI for a report file, or a PropertyBag that contains a String representing the URI for a report file.
options - This parameter is currently ignored; all reports are opened as read-only.
Throws:
ReportSDKException - if the document fails to open
java.lang.IllegalArgumentException - if documentPath is not valid

close

public void close()
           throws ReportSDKException

Closes the ReportClientDocument and releases all resources.

Throws:
ReportSDKException - if the document fails to close

getDatabaseController

public DatabaseController getDatabaseController()
                                         throws ReportSDKException

Returns the DatabaseController object that is used to access the tables that are used as the report's data source.

Returns:
The DatabaseController object that is used to access the tables that are used as the report's data source.
Throws:
ReportSDKException

getReportSource

public IReportSource getReportSource()

Returns the ReportSource object used by the viewer to display the contents of the report.

Returns:
The IReportSource object or null if the ReportSource could not be retrieved

setLocale

public void setLocale(java.util.Locale locale)
               throws ReportSDKException

Sets the locale that is used to localize various aspects of the document.

Note: The locale must be set before the ReportClientDocument is opened.

Parameters:
locale - The Locale object that is used to localize the document.
Throws:
ReportSDKException - if the ReportClientDocument is already open

getSubreportController

public SubreportController getSubreportController()
                                           throws ReportSDKException

Returns the SubreportController object used to determine the names of the subreports in the report and to modify the subreports' databases.

Throws:
ReportSDKException

verifyDatabase

public void verifyDatabase()
                    throws ReportSDKException

Checks to ensure that the report is using the most current data scheme from its database. If the scheme of the database on the server have been changed, the report is automatically updated. If a field has been deleted from the database, the field will also be deleted from the report. If the database field type has changed, an attempt is made to map the old field type to a new type. If the method fails, it throws a ReportSDKException containing the error code.

Throws:
ReportSDKException