This topic introduces the Design API sample programs Logi Report provides and how you can run them to create and edit reports.
After you install the Design API by Designer or Server, you can get the following Design API sample programs in
An example of creating a library component with a table, a crosstab, and a chart.
An example of creating a web report with a table, a crosstab, and a chart arranged in a tabular.
An example of how to modify an existing page report template.
An example of designing a report with a chart.
An example of designing a report containing a banded object.
An example of designing a report with a subreport.
An example of inserting a crosstab into a banded object.
An example of designing a report with a crosstab.
To compile and run the sample programs, you should add jar files with their paths into the class path. You need to add different jar files according to how you install the Design API.
For example, you can use the following command to compile the sample program TestDesignInvoice.java:
C:\LogiReport\Designer\help\samples\APIDesign>javac -classpath "C:\LogiReport\Designer\lib\JREngine.jar;C:\LogiReport\Designer\lib\sac-1.3.jar;C:\LogiReport\Designer\lib\report.jar;C:\LogiReport\Designer\lib\log4j-core-
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.
When you run the sample programs, you need to provide two or three parameters. If you want to use two parameters, they should be the catalog path and catalog name; if you want to use three parameters, they should be the catalog path, catalog name, and log file with a full path name.
The following example uses three parameters to run TestDesignInvoice.java. Here, it is assumed that you have installed Designer in
C:\LogiReport\Designer, and the current directory when you execute these commands is
C:\LogiReport\Designer\help\samples\APIDesign (location of the sample programs). After running the program, you can find a newly created file TestInvoice.cls in
C:\LogiReport\Designer\help\samples\APIDesign>java -Dreporthome="C:\LogiReport\Designer" -classpath "C:\LogiReport\Designer\lib\JREngine.jar;C:\LogiReport\Designer\lib\sac-1.3.jar;C:\LogiReport\Designer\lib\report.jar;C:\LogiReport\Designer\lib\log4j-core-
TestDesignInvoice -path=C:\LogiReport\Designer\Demo\Reports\TutorialReports -catalog=JinfonetGourmetJava.cat -report=TestInvoice.cls -log=C:\LogiReport\Designer\logs\designer.log