BackPrevious Page Next PageNext

Knowing Catalogs

What's in a catalog file

What are the advantages of catalogs

Catalog file formats

This document introduces the contents and benifits of the JReport catalog generally.

What's in a catalog file

A catalog file stores all of the object definitions that you have created while developing the reports that are stored in the same catalog folder. This includes data resource definitions, component customizations, style definitions, and more. The following illustration summarizes the content of a catalog file:

Illustration of a Catalog File

A database connection defines the database information from which the catalog retrieves its raw data. For example, it specifies the driver such as a JDBC driver, data source name, connection URL, user ID and password for connecting to the database or other data source. In this way, a connection is the gateway to the raw database.

Tables/Views/Synonyms, stored procedures, and imported queries (including imported SQL files and imported APEs) are all based on the database connection. Stored procedures are defined in the database. Imported SQLs and imported APEs are query statements in external files added to the catalog. Stored procedures and imported queries only need to connect with your database (you do not necessarily have to add the database tables) and can be used as data sources for reports.

User data sources (UDS) requires that users write the code for fetching the records. They are independent from the database connection.

Queries are a higher-level object in a catalog. The concept is similar to that of views in the relational database but they are stored in the catalog file rather than the database itself. You can use queries to view, change and analyze data in different ways, and JReport can help you with the building of various professional reports based on queries.

Business views provide end users with an easily understandable data repository which contains data resources pertinent to the creation or editing of interactive reports without exposing any underlying data structure to them.

Parameters are used to control the report content at runtime. They are most often used for entering data selection criteria that is passed to the database in a query or stored procedure.

Formulas and summaries are objects that are computed at runtime.

Containers, styles, special fields, and drawing objects can each be customized by setting a wide range of object properties.

However catalogs which support a large number of reports can become very large and difficult to maintain, so it is best to create a new catalog for each category of report types you create. For example, you may have reports for sales, accounts receivable, customer information, inventory management and so on. If you include all of these types of reports in a single catalog it becomes more difficult to maintain and keep track of which formulas, summaries belong to which group of reports. A better way is to create a separate catalog for each group of reports which will use similar queries, formulas, summaries and so on.

What are the advantages of catalogs

The main advantage of catalogs is that they provide a way to organize related reports and make it easy for these reports to share objects, have a consistent look and feel, and can be moved to different systems. Once you define the data source connections in a catalog and import the data resources from the connections, you can use the data resources to build many queries and business views and then create reports on these queries and business views. Catalogs also provide these additional benefits:

Catalog file formats

JReport Designer supports two formats of catalog files. One is the .cat file, which is in binary, and the other is the .cat.xml file, which is in XML format. The .cat format catalog can be manipulated (opened, saved, and edited) only by JReport Designer since it is a proprietary binary file. The XML format catalog has many advantages. It has more readability and controllability. You can modify the catalog freely according to your requirements without using any other special editor. However, the operation of .cat.xml format catalog in JReport Designer is the same as that of .cat format catalog. The difference between these two is the underlying structure in which they are organized. By default, the XML Format Catalog feature is not enabled. Contact Jinfonet Support at support@jinfonet.com to upgrade your license key if desired.

BackPrevious Page Next PageNext