Creating, Opening and Saving Catalogs
A report can only exist within a catalog folder that contains a catalog file. Therefore you must create and open a catalog before you create or edit a report.
A catalog is represented at the operating system level as a directory that contains the catalog file as well as the other report objects. A catalog folder must contain only one catalog file. You can use the operating system commands to copy and rename catalog files as long as you ensure you only have one catalog file per folder. A process you may use is to first create a base catalog with only connection information and tables used by all applications. You can then copy and rename this to create as many catalog folders and catalog files as you need for your reporting requirements.
Below is a list of the sections covered in this topic:
Creating a Catalog
- Select File > New Catalog. The New Catalog dialog appears.
If necessary, Logi JReport Designer will prompt you to save changes to the current open catalog. Only one catalog can be open at a time.
- In the Name field, enter the name for the catalog. The catalog name must include the extension (.cat or .cat.xml)
- In the Data Source Name field, input the name for the data source that will be created along with the catalog (when creating a catalog, by default, a data source is created in the catalog at the same time). You can include spaces in the name but do not use special characters.
- Specify the path to save the catalog in the Directory field. You can also select the button to browse to and select the directory in which to create the catalog. The directory you specify must not already contain a catalog file.
- Select OK to create the catalog. The Catalog Manager displays, with a data source created for the catalog.
You can then set up the required connections to connect the catalog data source with your databases. A data source in a catalog can be connected with multiple connections.
Adding Data Sources in a Catalog
Logi JReport Designer supports the Multiple Data Sources feature, which means in one catalog you can add as many data sources as you need and connect them with many different types of data. However, if you want to mash up data that come from multiple connections into a single query or business view, the database connections must be all in the same data source in the catalog.
To add another data source to a catalog:
- Do either of the following:
- In the Catalog Manager, select a data source node, then select New Data Source on the Catalog Manager toolbar.
- Select Home > New > Data Source.
- Select File > New > Data Source.
The New Data Source dialog appears.
- In the Data Source Name text box, specify the name of the new data source.
- From the Connection Type box, select the type of the first connection to create in the new data source.
- Select OK. The corresponding connection wizard appears. Set up the connection as required.
Setting the Default Data Source for a Catalog
When a catalog contains multiple data sources, you need to specify which data source will be the default one for the catalog (by default, the data source that is created along with the catalog is the default data source of the catalog). To change the default data source, right-click the data source which you want to use as the default data source, then select Set as Default on the shortcut menu. A catalog must have one and only one default data source.
Opening a Catalog
You can open a catalog explicitly, by using the Open Catalog command, or you can open it implicitly, by opening one of the reports in the catalog.
To open a catalog explicitly:
- Select File > Open Catalog.
If necessary, Logi JReport Designer will prompt you to save changes to the current open catalog. Only one catalog can be open at a time.
- In the Open Catalog File dialog, browse to and select the catalog you want to open and then select the Open button.
The Catalog Manager displays, listing the data resources in the specified catalog. You can manage the resources using the manager.
Saving a Catalog
To save a catalog, select Save Catalog on the Catalog Manager toolbar. The type, name and location were specified when you created the catalog.
You can also select either of the following on the File menu tab to save a catalog:
- Save Catalog
Saves the open catalog. - Save Catalog As
Saves the open catalog in the selected alternate format. Options are .cat or .cat.xml. The .cat.xml file can be in the same directory as the .cat file. When you open the catalog in Designer, you can select either the .cat or the .cat.xml version; however, only the open one will be updated. If you publish the report to Logi JReport Server, be sure to publish only the updated one as the out of date one will likely produce errors when the user runs the report with the outdated catalog. It is best practice to keep only one version of the catalog once you decide which format you will use to publish.
A directory can contain only one catalog file other than the .cat and .cat.xml of the same catalog. To merge multiple catalog files, see Merging Catalogs.
Sharing Catalog Files Among Multiple Report Developers
By default, the report file and resources referenced by this report are created and saved in the current catalog. You can also save a report or other resource to a catalog other than the one in which it is created. All the catalog resources related to this report will then be merged into the catalog in the specified folder. This can allow a team of report developers to share resources. Each report developer can work on a local version of the catalog, and then use the Save To command to have his catalog merged into a universal catalog. The universal catalog must have the same name as the current catalog. The Save To command saves not only the report files, but also the resources (query, formulas, and parameters) that are referenced by this report. When there is a conflict, the report developer must decide which version to keep or modify his catalog to rename the conflicting resources and try the Save To again.
For details about how to share catalog files, see Merging Catalogs and Saving a Report to a Different Catalog.