To help you start using the Design API, here is a simple example which shows how to use the JReport Design API package to compile and run a Java class that returns the connection information from a catalog file.
<install_root>\help\samples\APICatalog
.
javac -classpath <install_root>\lib\JREngine.jar;<install_root>\lib\sac.jar;<install_root>\lib\report.jar TellMeConnection.java
dr.setUserInfo("UID","XXXXXXXXXXX")
in TellMeConnection.java.
|
For example,
|
And the output should be as follows:
Name: Jinfonet demo
Driver: org.hsqldb.jdbcDriver
URL: jdbc:hsqldb:c:\JReport\Designer\Demo\db\JRDemo
User: sa
Password
TimestampFormat yyyy-MM-dd HH:mm:ss.SSS
TimeFormat HH:mm:ss
DateFormat yyyy-MM-dd
ExtraNamePattern Default(JDBC)