当前位置: 首页 > 工具软件 > crystal-mysql > 使用案例 >

mysql jdbc 水晶报表_关于在水晶报表中用JDBC方式连接MySQL数据库

喻渊
2023-12-01

Tag Name

Description

reportlocation

When creating a report source using the Java Reporting Component, the report's path can be specified by using either a relative or absolute path.

When using relative paths, the path is specified relative to the location of the Java Reporting Component on the web server. For example, ../reports/sample.rpt resolves to /WEB-INF/reports/sample.rpt where the Java Reporting Component JAR file is in /WEB-INF/lib. The value of the reportlocation tag becomes the new root directory that is used to determine the location of a report. If the reportlocation tag is not present, the Java Reporting Component uses absolute paths.

When using absolute paths, the Java Reporting Component will also look in the location of your web application's resources. For example, you can place your report into the classes folder and then specify the name of the report directly in your JSP file (with no path). In this case, the Java Reporting Component will find the report.

To use absolute paths, ensure that the CRConfig.xml file does not contain a reportlocation tag.

timeout

The time out interval determines (in minutes) when inactive report sources are disposed. By default, the timeout interval is 10 minutes. You can configure the Java Reporting Component to have no timeout by setting the value to 0.

The timeout interval only applies to inactive reports—reports that are being processed are not timed out as a result of exceeding this value. Each time a report source request is successfully completed, the timeout timer is reset. If a report source is not used within the timeout interval, it is disposed and its resources are made available to other processes.

ExternalFunctionLibraryClassNames

classname

The classname tag value is the fully qualified classname to the first Java function library.

Repeat this tag for each Java function library that you want to reference.

keycode

The keycode tag specifies the key code used when running the Java Reporting Component.

DataDriverCommon

JavaDir

The JavaDir tag contains the directory of your Java executable. If you have multiple versions of the Java Runtime Environment installed, this tag points to the version that you want to use; for example:

C:\apps\j2sdk1.4.2\bin

Alternatively, the path information may be configured as a user or system environment variable. In this case, if JAVA_HOME is defined as a variable, you can use ${JAVA_HOME} as in this example:

${JAVA_HOME}\bin

Classpath

The Classpath tag contains a list of the classpaths to the following .jar files:

CRDBJavaServer.jar

All database-specific JDBC driver .jar files

For the Oracle JDBC driver, for example, classpath to ojdbc14.jar is required.

Alternatively, the classpath information may be configured as a user or system environment variable. If this variable is not defined, it is equivalent to ${CLASSPATH}.

Environment variables can also be included in a mixed path, as shown in this example:

c:\java\lib\xerces.jar;${CommonProgramFiles}"/Crystal Decisions/2.5/bin/CRDBJavaServer.jar";${CLASSPATH}

When using classpaths with long folder and/or file names that contain spaces, ensure that they are enclosed within quotation marks. For example, "C:\Program Files\Common Files\Crystal Decisions\2.5\bin\CRDBJavaServer.jar".

IORFileLocation

The IORFileLocation tag provides a temporary directory for use by the JDBC driver. This location must exist and be accessible by the system; otherwise, the driver will fail to work.

JavaServerTimeout

The JavaServerTimeout tag specifies the maximum amount of time your Java server will continue processing your request until it shuts itself down. The default value is 1800 seconds (30 minutes).

JVMMaxHeap

The JVMMaxHeap tag specifies the maximum amount of heap space that the JVM can allocate for running the Java server. This tag is set to 64 MB of heap by default. Change this number to a higher value if you need to process a large amount of data.

JVMMinHeap

The JVMMinHeap tag specifies the minimum amount of heap space that the JVM can allocate for running the Java server. This tag is set to 32 MB of heap by default.

NumberOfThreads

The NumberOfThreads tag specifies the number of concurrent instances that can be run. This tag is set to 50 by default.

JDBC

CacheRowSetSize

The CacheRowSetSize tag specifies the number of rows to cache in memory. This tag is set to 100 rows by default.

JDBCURL

The JDBCURL tag is the default JDBC connection URL that will be displayed in Crystal Reports when you create a new JDBC data connection. The exact format of the connection URL is specific to the database driver and is provided by the database driver vendor.

For example, the connection URL for the Oracle JDBC driver is:

jdbc:oracle:thin:@::

Where:

is the TCP/IP address or TCP/IP host name of the server to which you are connecting.

is the number of the TCP/IP port.

is the Oracle database ID.

JDBCClassName

The JDBCClassName is the default full classname of the JDBC driver that will be displayed in Crystal Reports when creating a new JDBC data connection.

For example, the full classname of the Oracle JDBC driver is:

oracle.jdbc.driver.OracleDriver

JDBCUserName

The JDBCUserName is the default user ID that will be displayed in Crystal Reports when creating a new JDBC data connection. The JDBC driver uses the user ID to connect to the database.

JNDIURL

The JNDIURL tag is the default JNDI connection URL that will be displayed in Crystal Reports when you create a new JNDI data connection. The exact format of the connection URL is specific to the database driver and is provided by the database driver vendor.

JNDIConnectionFactory

The JNDIConnectionFactory tag is the name of the connection factory of the JNDI server. For WebLogic, it is weblogic.jndi.WLInitialContextFactory. For WebSphere, it is com.ibm.websphere.naming.WsnInitialContextFactory.

JNDIInitContext

The JNDIInitContext tag is the starting point for where to look for JNDI context on the JNDI server. For example, you can set JNDIInitContext=/ for WebLogic. The tag starts to search from the top of the tree. You can set this tag to cell/nodes/localhost/servers/server1/jdbc for WebSphere if you created the connection in this node.

JNDIUserName

The JNDIUserName is the default user ID that will be displayed in Crystal Reports when creating a new JNDI data connection. The JDBC driver uses the user ID to connect to the database.

GenericJDBCDriver

Option

The Option tag specifies whether a generic driver is used. Valid values are Yes and No.

DatabaseStructure

The DatabaseStructure tag describes the data structure of the specific database whose driver is being emulated.

StoredProcType

The StoredProcType tag describes the type of Stored Procedure that the database uses.

LogonStyle

If you are using a generic JDBC driver instead of a specific driver, the LogonStyle tag specifies the driver whose logon style you want to emulate. Valid values are DB2, SQLServer, and Oracle.

XML

CacheRowSetSize

The CacheRowSetSize tag specifies the number of rows to cache in memory. This tag is set to 100 rows by default.

PreReadNBytes

The PreReadNBytes tag determines the number of bytes to read from the XML doc for each logical read. This parameter is used to improve efficiency and to avoid reading one byte at a time; it is equivalent to block read size. The size should not be too small (at least 4096). Setting the value too high affects memory usage. This parameter is set to 4096 by default.

XMLLocalURL

The XMLLocalURL tag is the default connection URL for a local XML file. This default will be displayed in Crystal Reports when you create a new XML data connection.

SchemaLocalURL

The SchemaLocalURL tag is the default connection URL for a local schema file. This default will be displayed in Crystal Reports when you create a new XML data connection.

XMLHttpURL

The XMLHttpURL tag is the default connection URL for an HTTP XML file. This default will be displayed in Crystal Reports when you create a new XML data connection using HTTP(S).

SchemaHttpURL

The SchemaHttpURL tag is the default connection URL for an HTTP schema file. This default will be displayed in Crystal Reports when you create a new XML data connection using HTTP(S).

JavaBeans

CacheRowSetSize

The CacheRowSetSize tag specifies the number of rows to cache in memory. This tag is set to 100 rows by default.

JavaBeansClassPath

The JavaBeansClassPath tag value is the fully qualified classname to the Java Bean.

 类似资料: