Connecting to the external library from a third-party application

On many occasions, we do not execute the SPL script directory in esProc; instead, we integrate esProc to a third-party application to do the job. In those cases, in order to use the external library feature, we need get raqsoftConfig.xml from esProc installation root directory/esProc/config and add the following code to the file’s <Runtime><EsProc> ... </EsProc></Runtime> to specify the path of referencing the necessary jars used by the external library:

<extLibsPath>external library folder path</extLibsPath>


<lib> external library folder name</lib> 


Take embedding esProc in a Java application as an example, below explains how to use reportliteCli external library in a third-party application:

1. Load jars used by esProc JDBC

See Tutorial - Deploying JDBC to load jar files used by esProc JDBC.

2. Configure esProc JDBC’s raqsoftConfig.xml file

See Tutorial - Configuring raqsoftConfig.xml.

3. Load jars used by reportliteCli external library

Copy the core jar of reportliteCli external library (scu-reportlite-cli-2.10.jar) and jars listed below from report class path (installation root directory\reportlite\lib) to an independent directory (such as D:\ extlib\ReportLiteCli):

















Among them, scu-reportlite-cli-2.10.jar is the core jar of reportliteCli external library.

Note: you can use the above necessary jars as needed in practical uses.


4. Configure xml file for reportliteCli external library

Copy raqsoftConfig.xml located ininstallation root directory\reportlite\config and rename the file raqsoftConfigReportLite.xml (you can rename it as you like), where you need to configure the following nodes:


<home> </home>  // Configure report main directory

<styleConfig> </styleConfig>  // Configure report layout



<home> configures the report’s default storage directory; when importing a report through a relative path, the path is relative to the main directory configured here.

<styleConfig> configures report layout file’s path; it can be empty.


5. Configure data source

If the report to be imported uses a data source, you need to configure a namesake and same-structure data source in reportliteCli external library’s xml file (which is raqsoftConfigReportLite.xml in step 4). If the report does not use a data source, just skip this step.

<DB name="demo">

<property name="url" value="jdbc:hsqldb:hsql://" />

<property name="driver" value="org.hsqldb.jdbcDriver" />

<property name="type" value="13" />

<property name="user" value="sa" />

<property name="password" />

<property name="batchSize" value="1000" />

<property name="autoConnect" value="true" />

… …


If you want to execute the spl file at command line, you need to configure autoConnect property value as true in xml file’s data source node, otherwise no data source can be found.


6. Add external library node <lib> to esProc JDBC’s raqsoftConfig.xml file:

Configure external library node <lib>. In step 3 we’ve already put jars used by reportliteCli external library in D:\extlib\ReportLiteCli. Now we add the node directly:


… …

// Configure path of external library folder



// Configure external library folder’s name





7. Configure and access reportliteCli external file’s spl file






Read ReportLite’s configuration file information



Read test.rptx



Compute test.rptx

See Tutorial - Java Invocation to learn how to deploy a spl file.

Now you can invoke the above spl file in the Java application.