New 'Java project'

To implement one or more templates for Jasper Reports, you must first create and configure a 'Java Project' in Jaspersoft Studio.

1. Creation of a new Java project

images/download/attachments/62851444/image2018-8-22_17_9_46-version-1-modificationdate-1603704694633-api-v2.png

Figure 1: Creating a Java Project via File/New (1)/Other (2) to open the wizard


images/download/attachments/62851444/image2018-8-22_17_15_20-version-1-modificationdate-1603704694643-api-v2.png

Figure 2: Selection of Java/Java Project (1) in the wizard and then continue with Next (2)


images/download/attachments/62851444/image2018-8-22_17_21_18-version-1-modificationdate-1603704694646-api-v2.png

Figure 3: Project name (1) and Next (2) with the given default settings


2. Configuration of the new project

2.1. Jasper Reports Libraries

Before the creation of the new project is completed via Finish, 'JasperReports Libraries' should be assigned.

images/download/attachments/62851444/image2018-8-27_9_57_15-version-1-modificationdate-1603704694649-api-v2.png

Figure 4: Open the selection menu for libraries via Add Library... (1)


images/download/attachments/62851444/image2018-8-27_10_1_25-version-1-modificationdate-1603704694655-api-v2.png

Figure 5: Select the library 'JasperReports Libraries' (1) and continue with Next (2)


images/download/attachments/62851444/image2018-8-27_10_26_36-version-1-modificationdate-1603704694662-api-v2.png

Figure 6: With Finish (1) the 'JasperReports Libraries' are added to the 'Build Path' of the new project

2.2. External library of Lobster Data Platform / Orchestration

Furthermore, an external library 'jasper.ext.jar' from Lobster Data Platform / Orchestration should be included in the new project, which provides additional functions for the later implementation of reports. The corresponding file can be extracted from the Lobster Data Platform / Orchestration installation file 'jasperreport.server.mar' using a common Zip program (e.g. WinZip, WinRAR, 7-Zip, etc.).

images/download/attachments/62851444/image2018-8-27_10_25_40-version-1-modificationdate-1603704694660-api-v2.png

Figure 7: Open the dialog for adding external libraries via Add External JARs... (1)


images/download/attachments/62851444/image2018-8-27_10_37_19-version-1-modificationdate-1603704694667-api-v2.png

Figure 8: Select the file 'jasper.ext.jar' (1) and then continue with Open (2)


images/download/attachments/62851444/image2018-8-27_10_47_23-version-1-modificationdate-1603704694670-api-v2.png

Figure 9: After adding the two libraries (1), the project can be created via OK (2)

2.3 Configuration file 'scm.properties'

Finally, a configuration file must be created in the souce directory of the project to test the functions of the external library in Jaspersoft Studio.

images/download/attachments/62851444/27-08-_2018_10-54-08-version-1-modificationdate-1603704694675-api-v2.jpg


Figure 10: With a right click on the directory 'src' (1) of the new project in the Project Explorer the assistant for new objects can be opened via New/Other... (2)


images/download/attachments/62851444/image2018-8-27_11_6_44-version-1-modificationdate-1603704694682-api-v2.png

Figure 11: Selection of the object File (1) under the folder General in the assistant for new objects and continue with Next (2)


images/download/attachments/62851444/image2018-8-27_11_19_26-version-1-modificationdate-1603704694684-api-v2.png

Figure 12: Enter File name 'scm.properties' (1) and continue with Finish (2)


Now 2 more entries have to be added to the file just created.

  1. Under 'url' you should enter a known address for an Lobster Data Platform / Orchestration server (e.g. url=https://lobster-test.cst.scm.lobster.de:8443/SCM/)

  2. Under 'locales' the preferred language for the tests should be set (e.g. locales=en)


images/download/attachments/62851444/27-08-_2018_12-04-19-version-1-modificationdate-1603704694690-api-v2.jpg

Figure 13: Editing the file 'scm.properties' (1) under the tab Default (2). By saving the file (3) the configuration of the new 'Java Project' is finished


NOTE◄ When a project configuration is complete, Jaspersoft Studio must be closed and restarted before continuing to implement a Jasper Report.