com.crystaldecisions.sdk.occa.report.application
Class ReportAppSession

java.lang.Object
  extended by com.crystaldecisions.sdk.occa.report.application.ReportAppSession

public class ReportAppSession
extends java.lang.Object

Use ReportAppSession to establish a connection to a specific RAS server. This class should only be used with the standalone version of RAS, where there is only one RAS server on the network. In Crystal Enterprise 9.0 and higher (BusinessObjects Enterprise as of version 11), however, you can have several RAS servers and server groups. In this scenario, you should not use the ReportAppSession to establish a connection with a specific RAS server. For RAS connection setup in BusinessObjects Enterprise, see the IReportAppFactory class in the BusinessObjects Enterprise Java SDK Guide.

The ReportAppSession object allows you to specify the name of the RAS server, and determine the locale. Use the initialize method to begin a session with the RAS server and the createService to create a ReportClientDocument object that allows you to open and modify reports.

To establish a connection to a RAS server

  1. Set a new ReportAppSession.
  2. You can establish a connection in one of two ways:
  3. Use Initialize to begin session.
  4. Use createService to enable your SDK object to communicate with the RAS server.


Constructor Summary
ReportAppSession()
           
 
Method Summary
 java.lang.Object createService(java.lang.String className)
          Deprecated.  
 java.util.Locale getLocale()
           Returns the locale (language) used for the RAS SDK object.
 java.lang.String getReportAppServer()
           Returns the name of the RAS server that is modifying the open report or that is used to modify the report.
 void initialize()
           Establishes a connection to the RAS server.
 void setLocale(java.util.Locale locale)
           Sets the locale (language) used for the RAS SDK object.
 void setReportAppServer(java.lang.String reportAppServer)
           Sets the name of the RAS server that is modifying the open report or that is used to modify the report.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportAppSession

public ReportAppSession()
Method Detail

createService

public java.lang.Object createService(java.lang.String className)
                               throws java.lang.ClassNotFoundException,
                                      ReportSDKException,
                                      java.lang.IllegalAccessException,
                                      java.lang.InstantiationException
Deprecated. 

Creates an SDK object that needs to communicate with the RAS server. You can use this method, once connected to the RAS server, to specify one of two services: "CrystalClientDoc.ReportClientDocument" or "CrystalReports.ConnectionDirManager". To begin the service, use the initialize() method. If you have specified the ReportClientDocument service, use either the newDocument() method to create a new report to connect to the RAS Server or the open method to open an existing report; if you have specified the ConnectionDirManager service, use the open method to open the Connection Directory Manager. The Connection Directory Manager is a tree control that allows you to browse for available data sources.

Parameters:
className - The programmatic identifier of the object. This value is the fully qualified class name of the desired service. This can be either com.crystaldecisions.sdk.occa.report.application.ReportClientDocument or com.crystaldecisions.sdk.occa.report.application.ConnectionDirManager.
Returns:
An Object corresponding to the specified service.
Throws:
java.lang.ClassNotFoundException
ReportSDKException
java.lang.IllegalAccessException
java.lang.InstantiationException

getLocale

public java.util.Locale getLocale()

Returns the locale (language) used for the RAS SDK object.

Returns:
A Locale object that defines the language settings used for the RAS SDK.
See Also:
setLocale(java.util.Locale)

getReportAppServer

public java.lang.String getReportAppServer()

Returns the name of the RAS server that is modifying the open report or that is used to modify the report. This is also used by the ConnectionDirManager object to get directory items.

Once you specify which RAS server you wish to connect to, use the initialize() method to establish your connection.

Returns:
A String that specifies the name of the RAS server that is modifying the open report or that is used to modify the report.
See Also:
setReportAppServer(java.lang.String)

initialize

public void initialize()
                throws ReportSDKException

Establishes a connection to the RAS server. Once a connection is established, for that session, you cannot establish a connection with a different RAS server unless you create a new ReportAppSession object.

Throws:
ReportSDKException

setLocale

public void setLocale(java.util.Locale locale)

Sets the locale (language) used for the RAS SDK object.

Parameters:
locale - A Locale object that defines the language settings used for the RAS SDK.
See Also:
getLocale()

setReportAppServer

public void setReportAppServer(java.lang.String reportAppServer)
                        throws ReportSDKException

Sets the name of the RAS server that is modifying the open report or that is used to modify the report. This is also used by the ConnectionDirManager object to get directory items.

Once you specify which RAS server you wish to connect to, use the initialize() method to establish your connection.

Parameters:
reportAppServer - A String that specifies the name of the RAS server that is modifying the open report or that is used to modify the report.
Throws:
ReportSDKException
See Also:
getReportAppServer()