The RAS Environment

book list add book to my bookshelf create a bookmark purchase this book online

mastering crystal reports 9
Appendix C - Crystal Reports and Java
Mastering Crystal Reports 9
by Cate McCoy and Gord Maric
Sybex 2003

The RAS environment consists of the RAS Server components, Crystal Reports that are run by RAS, and the RAS Java SDK. All can reside on the same computer or on separate computers.

The RAS Server has access to a directory and subdirectory, which can contain Crystal Reports. The default location of the directory that RAS has access to is the directory where the sample report files is the located. To publish a report to RAS, simply copy a report to this directory to give RAS access to it. This folder and its subfolders are the only ones that RAS has access to. To change the default location of this directory, use the Configuration Manager installed with RAS. It is recommended for efficiency to keep Crystal Reports on the same RAS Server instead of a separate machine. If the reports are on a different machine, you can access them by using the rassdk:// prefix when opening a report via the SDK.

The RAS APIs and RAS Server are installed by default on the same computer. The JAR files that contain the APIs can be found in C:\Program Files\Common Files\Crystal Decisions\2.0\jars\.

The clientSDKOptions.xml file is configuration file that contains a server attribute that specifies the location of the RAS server. You can manipulate this file manually or modify it programmatically. This file is located by default in C:\Program Files\Common Files\Crystal Decisions\2.0\jars\ and the server attribute is set to the local machine. If you move the JAR files to another computer, you must modify this file to indicate the location of the RAS Server. Listing C.1 shows the client- SDKOptions.xml file. If you have multiple RAS Servers, you can add multiple server attribute entries in clientSDKOptions.xml.

Listing C.1: clientSDKOptions.xml

start example
<CrystalReports.clientSDKOptions xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" version="2" xsi:type="CrystalReports.ClientSDKOptions"> <ServerInfos version="2" xsi:type="CrystalReports.ServerInfos" > <ServerInfo version="2" xsi:type="CrystalReports.ServerInfo" >   <Server>GMARIC</Server>    <Adapter>TCPIP</Adapter>    </ServerInfo>   </ServerInfos> </CrystalReports.ClientSDKOptions>
end example

The clientSDKOptions files needs to be set in the classPath to enable the API to find it. However, you can define the location of the clientSDKOptions.xml file in code. In your JSP or Java files, you can use the Java method setProperty from the System class with the ras.config key for specifying this file. To specify the path, add the following line to your code:

system.setProperty("ras.config", "c:/temp")

This specifies that the clientSDKOptions.xml file used to specify the RAS Server location is in the local C:/temp directory.

Use of content on this site is expressly subject to the restrictions set forth in the Membership Agreement
 
Conello © 2000-2003     Feedback


Mastering Crystal Reports 9
Mastering Crystal Reports 9
ISBN: 0782141730
EAN: 2147483647
Year: 2005
Pages: 217

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net