1.
首先找到配置文件
CRConfig.xml
,具體根據
Crystal Report XI(11.0)
的安裝路徑決定,當前系統為
D
:/Program Files/Common Files/Business Objects/3.0/java/CRConfig.xml.
(注:CR XI Release 2(11.5)版本為D:/Program Files/Business Objects/Common/3.5/java/CRConfig.xml)
2.
主要配置如下標簽中的內容
:
<JavaDir>
JDK
運行環境
<
/
JavaDir>
<Classpath>
JDBC
驅動包的路徑
<
/
Classpath>
<JDBCURL>
數據庫連接的
URL
<
/
JDBCURL>
<JDBCClassName>
加載驅動的類
<
/
JDBCClassName>
<JDBCUserName>
訪問數據庫用戶
<
/
JDBCUserName>
3. 配置實例
SQLServer2000
篇
<?xml version="1.0" encoding="utf-8"?>
<CrystalReportEngine-configuration>
<reportlocation>../..</reportlocation>
<timeout>10</timeout>
<ExternalFunctionLibraryClassNames>
<classname></classname>
<classname></classname>
</ExternalFunctionLibraryClassNames>
<keycode>B6W60-01CS200-000UK40-02Y0</keycode>
<Javaserver-configuration>
<DataDriverCommon>
<JavaDir>d:/jdk/bin</JavaDir>
<Classpath>
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/crlovmanifest.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/CRLOVExternal.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/CRDBJavaServerCommon.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/CRDBJavaServer.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/CRDBJDBCServer.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/CRDBXMLServer.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/CRDBJavaBeansServer.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/external/CRDBXMLExternal.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/external/log4j.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/cecore.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/celib.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/ebus405.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/corbaidl.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/external/freessl201.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/external/asn1.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/external/certj.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/external/jsafe.jar;
D:/Program Files/Common Files/Business Objects/3.0
/java/lib/external/sslj.jar;
C:/Program Files/Microsoft SQL Server 2000 Driver for JDBC/lib/msbase.jar;
C:/Program Files/Microsoft SQL Server 2000 Driver for JDBC/lib/mssqlserver.jar;
C:/Program Files/Microsoft SQL Server 2000 Driver for JDBC/lib/msutil.jar
;${CLASSPATH}
</Classpath>
<IORFileLocation>${TEMP}</IORFileLocation>
<JavaServerTimeout>1800</JavaServerTimeout>
<JVMMaxHeap>64000000</JVMMaxHeap>
<JVMMinHeap>32000000</JVMMinHeap>
<NumberOfThreads>100</NumberOfThreads>
</DataDriverCommon>
<JDBC>
<CacheRowSetSize>100</CacheRowSetSize>
<JDBCURL>
jdbc:microsoft:sqlserver://
ServerIP
:
1433
<
/JDBCURL>
<JDBCClassName>
com.microsoft.jdbc.sqlserver.SQLServerDriver
</JDBCClassName>
<JDBCUserName>
username
</JDBCUserName>
<JNDIURL></JNDIURL>
<JNDIConnectionFactory></JNDIConnectionFactory>
<JNDIInitContext>/</JNDIInitContext>
<JNDIUserName>weblogic</JNDIUserName>
<GenericJDBCDriver>
<Option>No</Option>
<DatabaseStructure>catalogs,tables</DatabaseStructure>
<StoredProcType>Standard</StoredProcType>
<LogonStyle>Oracle</LogonStyle>
</GenericJDBCDriver>
</JDBC>
<XML>
<CacheRowSetSize>100</CacheRowSetSize>
<PreReadNBytes>4096</PreReadNBytes>
<XMLLocalURL></XMLLocalURL>
<SchemaLocalURL></SchemaLocalURL>
<XMLHttpURL></XMLHttpURL>
<SchemaHttpURL></SchemaHttpURL>
</XML>
<JavaBeans>
<CacheRowSetSize>100</CacheRowSetSize>
<JavaBeansClassPath></JavaBeansClassPath>
</JavaBeans>
</Javaserver-configuration>
</CrystalReportEngine-configuration>