### Getting started

To help you start using the Designer API, here is a simple example which shows how to use the JReport Designer API package to compile and run a Java class that returns the connection information from a catalog file.

Assume that TestCatalogAPI.java in `<install_root>\help\designer\samples` has been run to generate a catalog file Tutorial.cat in the directory `<install_root>\Demo\Reports\APITutorial`.

1. Compile the sample code TellMeConnection.java in `<designer_install_root>\help\designer\samples`.

   `javac -classpath <install_root>\lib\JREngine.jar;<install_root>\lib\sac.jar;<install_root>\lib\report.jar TellMeConnection.java`

2. Set the license key for Designer API using the method dr.setUserInfo("UID","XXXXXXXXXXX") in TellMeConnection.java.
3. Run the sample code.

       java -classpath ".;<install_root>\lib\JREngine.jar;<install_root>\lib\report.jar;
       <install_root>\lib\sac.jar;<install_root>\lib\log4j-1.2.8.jar"
       -Dreporthome=<install_root> TellMeConnection <catalog path> <catalog name>

   For example,

       java -classpath "c:\JReport\Designer\lib\JREngine.jar;c:\JReport\Designer\lib\report.jar;
       c:\JReport\Designer\lib\sac.jar;c:\JReport\Designer\lib\log4j-1.2.8.jar;
       C:\JReport\Designer\lib\hsqldb.jar"-Dreporthome=D:\JReport\Designer
       TellMeConnection c:\JReport\Designer\Demo\Reports\APITutorial Tutorial.cat

   And the output should be as follows:

   Name: Jinfonet demo
   Driver: org.hsqldb.jdbcDriver
   URL: `jdbc:hsqldb:c:\JReport\Designer\Demo\db\DemoDB`
   User: sa
   Password
   TimestampFormat yyyy-MM-dd HH:mm:ss.SSS
   TimeFormat HH:mm:ss
   DateFormat yyyy-MM-dd
   ExtraNamePattern Default(JDBC)