Installing report samples involves the creation of a Java Project. To create the project follow these steps:
Procedure A.1. Installing report samples
Unzip the downloaded archive.
For convenience we will consider that the installation is performed on a Windows machine and that the archive is extracted on drive C. Ensure the correct extraction by confirming the presence of the following directories:
c:\jasperreports |
c:\jasperreports\demo |
Open the Java Project wizard.
In Eclipse, open the new project creation wizard by selecting: File->New->Project.... Select the Java Project option and proceed to the next step.
Choose the project name and location
Choose the name samples for the project. Select the directory c:\jasperreports\demo as the external location of the project and then proceed to the next step.
Configure build settings
The wizard automatically detects and proposes correct source folders as shown below:
Select the Libraries tab and configure the classpath as follows.
Click the Add JARs... button and add the barbecue, jCharts, jcommon and jfreechart jar files.
Click the Add External JARs... button and add the following jar files:
c:\jasperreports\lib\itext-1.01.jar |
c:\jasperreports\lib\servlet.jar |
Click the Add Variable... button and add the LIB_JASPERREPORTS variable.
Click the Add Class Folder... button and add the samples\fonts directory.
Set the default output folder option to samples\build and proceed to the next step.
Finish Project Creation
Click Finish to finish the project creation.
Enable Report Compiler
Enable the JasperAssistant report compiler for the created project (see Section 7.2, “Compiling Reports”).