BackPrevious Page Next PageNext

Maintaining Catalogs with the Catalog Doctor

Errors the Catalog Doctor can detect

Starting the Catalog Doctor

Diagnosing and fixing problems

Merging catalogs

JReport Designer provides a tool - the Catalog Doctor for you to maintain catalogs and diagnose problems with catalogs. This section shows how to use the Catalog Doctor to diagnose the specific resources of catalogs: connections, tables and fields, formulas and summaries, and queries.

Errors the Catalog Doctor can detect

With the Catalog Doctor you can diagnose and validate data resources in a catalog. Since the data resources in a catalog are constructed independently from each other, the Catalog Doctor diagnoses each type of data resource independently. For example, when it checks formulas, it only looks into the definition of parameters and DBFields in the current catalog. The system does not check whether the DBFields exist in the connected database. When the system checks the queries, it will only look for the mapping fields which are currently in the catalog, and does not confirm whether the formulas are valid.

For your convenience, in the following statements database refers to a raw database connected via JDBC, mapped table/view/synonym refers to a table/view/synonym in a catalog, raw table/view/synonym refers to a table/view/synonym in a raw database, and raw column refers to the columns in a raw database.

Mapped table/view/synonym and DBField

Formulas and summaries

Queries

Starting the Catalog Doctor

To start the Catalog Doctor, run the batch file named CatDr.bat or CatDr.sh on Unix/Linux in the <install_root>\bin directory.

You can also start it by issuing the following commands from an MS-DOS command prompt:

>cd c:\jreport\designer\bin
c:\jreport\designer\bin\>catdr

Diagnosing and fixing problems

After the Catalog Doctor is started, you can click File > Open to open the catalog you want to diagnose. All the resources in the specified catalog will then be listed in the left panel of the Catalog Doctor window. Select a resource from the resource tree. In the right panel, you will see the information of the selected resource.

You should diagnose the resources in the following order: connection > table and field > formula and summary > query.

Connections

The Catalog Doctor can be used to diagnose connections in the following aspects:

Tables and fields

The Catalog Doctor can be used to diagnose tables and fields in the following aspects:

Formulas and summaries

The Catalog Doctor can be used to diagnose formulas and summaries in the following aspects:

Queries

The Catalog Doctor can be used to diagnose queries in the following aspects:

Merging catalogs

With the Catalog Doctor, you can also merge the resources from two catalogs into one. However, before merging, you need to first specify at which level the differences between these two catalogs will be checked by the Catalog Doctor.

To specify the checking level:

  1. Click File > Options to display the Options dialog.

    Options dialog

  2. In the Merge Catalog Options box, specify the checking level.
  3. Click OK to accept the setting.

With the checking level specified, you can then start to merge catalogs.

To merge catalogs:

  1. Open the target catalog in the Catalog Doctor.
  2. Click File > Import, and then select the catalog that is to be imported. The Import from Catalog dialog appears.

    Import from Catalog dialog

  3. Select the resources from the catalog and click Add button to add it to the Imported node, then click OK.
  4. If you specified the checking level as Identify All Differences or Identify Critical Differences and the selected resources conflict with those in the target catalog, the Merge dialog appears for dealing with conflicting resources. The conflicting resources will be marked with red question marks.

    Merge dialog

  5. Click the Rename button to rename, or the Replace button to replace. You can also click the Skip button to skip.
  6. Click the Differences button to see the property values of the objects in the target catalog and the sources catalogs. Different property values will be highlighted.
  7. Click the Target Relation button to see the relationship between the object and its parent node.
  8. Repeat the steps above to manage conflicting resources, and then click the Merge button to merge the two catalogs. If the connections in the two catalogs connect to different data sources, you will be asked to modify the existing data source in the target catalog. For safety purposes, it is better to create a new data source.
  9. Click File > Save to save the changes and exit the Catalog Doctor.
  10. Launch JReport Designer, and open the merged catalog. The resources you just imported are now available and new data sources have been created.

BackPrevious Page Next PageNext