JReport Designer supports CSV as a data source which can be accessed via OOJDBC.
Here is an example demonstrating how to import a CSV file to an ODF file generated by the Model Wizard. In this example, employee.csv in <install_root>\help\samples\OOJDBC
will be used. Store it to <install_root>\Demo\Reports\TutorialReports
first. Then follow the steps below to import the file to a catalog.
To import the CSV file directly using the Model Wizard, take the following steps:
<install_root>\bin
. The Object Source Wizard will then appear.
<install_root>\lib
or to the directory where the catalog will be located. Here, we save it as employee_csv.odf.
Note: The same ODF file cannot exist in both <install_root>\lib
and the directory where the catalog will be located.
To import the generated employee_csv.odf file into a JReport catalog, take the following steps:
C:\odf
, the new catalog should be created also in C:\odf
.Now, the table Employee will be added into the catalog. You can use it to develop reports as required.
Note: When you publish the catalog and its reports to JReport Server, whether the ODF file is located in <install_root>\lib
or in the directory where the catalog is located, it will be published to the path where the catalog is located on the server side.