Getting Started
To help you start using the Design API, here is an example that shows how to use the Logi JReport Design API package to compile and run a Java class that returns the connection information from a catalog file.
- Compile the sample code TellMeConnection.java in
<install_root>\help\samples\APICatalog
(make sure that the path of the file JREngine.jar is before that of the file report.jar).javac -classpath <install_root>\lib\JREngine.jar;<install_root>\lib\sac-1.3.jar;<install_root>\lib\report.jar TellMeConnection.java
- Set the license key for Design API using the method
dr.setUserInfo("UID","XXXXXXXXXXX")
in TellMeConnection.java. - Run the sample code.
java -classpath ".;<install_root>\lib\JREngine.jar;<install_root>\lib\report.jar;<install_root>\lib\sac-1.3.jar;<install_root>\lib\log4j-core-2.7.jar;<install_root>\lib\log4j-api-2.7.jar" -Dreporthome=<install_root> TellMeConnection –path=<catalog path> -catalog=<catalog name>
For example,
java -classpath "C:\Logi JReport\Designer\lib\JREngine.jar;C:\Logi JReport\Designer\lib\report.jar;C:\Logi JReport\Designer\lib\sac-1.3.jar;C:\Logi JReport\Designer\lib\log4j-core-2.7.jar;C:\Logi JReport\Designer\lib\log4j-api-2.7.jar;C:\Logi JReport\Designer\lib\hsqldb-2.3.4.jar" -Dreporthome=C:\Logi JReport\Designer TellMeConnection -path=C:\Logi JReport\Designer\Demo\Reports\TutorialReports -catalog=JinfonetGourmetJava.cat
And the output should be as follows:
Name: Jinfonet demo
Driver: org.hsqldb.jdbcDriver
URL:jdbc:hsqldb:c:\Logi 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)
In the second week of December 2021, a Log4j vulnerability was announced that may affect some customers using our products. Resolving/mitigating this issue is a high priority! We will continue to issue information to help you with this vulnerability. For more information, select this link: Statement on Log4j and Log4Net Vulnerabilities.