Knowing Catalogs
A catalog file stores all of the object definitions that you have created while developing the reports that are stored in the catalog folder. This topic introduces the contents, benefits, and formats of the Logi JReport catalog.
Below is a list of the sections covered in this topic:
What Is 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:
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 Logi 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:
- Visual database - working off-line
From a system that is offline from the database, you can still continue to develop the reports that will access it. This is because the architecture of your database (tables/views, queries, and parameters) are stored in the catalog. - Data mashup
In a catalog, you can mash up multiple data resources from different database connections into a single query or business view for more complex, deeper insights. You can combine tables, views, synonyms, imported SQLs, stored procedures, user defined data sources and other existing queries, and can create distributed joins to set up inter-relationships between the data resources. Distributed joins extend this by letting you access multiple data resources as one virtual data resource. - Default values for data objects
You can set the default values for certain catalog data objects. Once set, their values do not need to be individually set in the report after they have been inserted. For example, each time you add a table you can set the font face, font size, data format and alignment once for its DBFields and each report component you create will already have these attributes set. - Data security control
You can control user access to different subsets of data and ensure that people only see what they are supposed to see by applying different security controls on your data objects. With Business View Security, you can limit user access to elements of the business views in a catalog. Record Level Security allows you to define which records are to be revealed to a given user, and Column Level Security allows you to define which report column is revealed to any given user. - Reference table
Logi JReport provides a reference table that can keep track of all the objects used in all the reports in a catalog. This feature makes object name changes easier to manage. - Sharing defined data objects among reports
Multiple reports can use data objects that have already been defined and saved in the catalog. - Publishing resources to Logi JReport Server
Logi JReportDesigner provides a convenient way to publish an entire catalog along with all of the required reports and referenced resources such as image files in one action to Logi JReport Server.
Catalog File Formats
Logi JReportDesigner 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 Logi 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 Logi 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 Logi Analytics Support at support@jinfonet.com to upgrade your license key if desired.