Tables and views are mapped objects of the tables and views in the raw database that a connection refers to. Mapped objects have mapped names that can be different from their names in the raw database. A catalog stores information about the real tables/views mapped, such as the name, qualifier, and owner.
Since tables/views are only mapped objects, they can be mapped and then re-mapped. That is, the information of the real tables/views stored in a catalog is changeable. This is useful when you are off-line from your database. You will still be able to see the table structure and generate reports. In addition, when changing the connection, for example, from an Access database to an Interbase, you will only need to re-map all the tables/views in the catalog as opposed to creating a new catalog.
The way to add tables and views stored in the database to a catalog via the JDBC connection you set up is the same. Below is the procedure for adding tables, and you can take the same steps to add views to a catalog.
To add tables to a catalog:
The Add Table dialog appears. See the dialog.
To choose consecutive tables, click the first table, press and hold down Shift, and then click the last table. To choose tables that are not consecutive, press and hold down Ctrl, and then click each table.
For example, if you want to add tables beginning with AL, you can type AL% (case sensitive) in the text box, and click the Load Tables button. All the tables beginning with AL in the selected schema will then be displayed in the Tables box. Choose the tables that are required by clicking Add. They will then be added to the connection.
Notes:
The tables/views in your catalog are a temporary deposit to improve the performance when you design and test your report. Your database keeps changing over the time. However, these will not be reflected automatically in your catalog. To synchronize your tables/views in the connection and database, you can choose to refresh the table/view information using the Refresh command on the shortcut menu of the table/view. Then when the refreshing job is done, a reporting dialog will be shown, summarizing the changes and operations that have been taken.
You can organize the tables/views, which have been added to a catalog via a JDBC connection, by arranging them in different folders in the Catalog Browser.
To add a folder:
To move tables/views to a folder:
By default, when you add a table/view, you add all the columns reside in the table/view. However, JReport gives you the flexibility to remove columns in a table/view, leaving only the columns useful to your reports. Additionally, your database keeps changing over the time. You can add the columns to the table after you delete them or the database has been updated.
To remove a column from a table/view:
To add columns to a table/view:
There will be no available column in the Columns box if you do not delete any in the table/view before, or no update has been made to the database. That is to say, you cannot add columns that do not belong to the table/view.
Tip: If you want to add all the columns in a table/view at a time, you can also choose to refresh the table/view, which synchronizes the table/view in catalog with the one in your database.
In the Catalog Browser, you can preview the data for a database column, which enables you to have a general idea about the field contents, field type, and other useful information related to this field.
To preview the data of a column: