### Using the Catalog Doctor

The following topics explain how to use the Catalog Doctor.

#### Starting the Catalog Doctor

In `<install_root>\bin`, there is a batch file named CatDr.bat. The Catalog Doctor can be started by running this batch file.

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`

#### Loading a catalog

To load a catalog into the Catalog Doctor for diagnosing, take the following steps:

1. Click File > Open to bring up the Open Catalog File dialog.
2. Select a catalog file, and click Open.

#### Saving a catalog

- To save the open catalog to the current file, click File > Save.
- To save the open catalog to another file, click File > Save As.

#### Merging catalogs

With the Catalog Doctor, you can also merge the resources from two catalogs into one. To do this:

1. Open the target catalog in the Catalog Doctor by clicking File > Open.
2. Click File > Import, and then select the catalog that is to be imported.
3. In the Import From Catalog dialog, select the resources from the catalog, and click OK.
4. The selected resources may conflict with those in the target catalog. The conflicting resources will be marked with red question marks.
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 will now be available and a new data source has been created.

Note: When merging catalogs, the Catalog Doctor has different levels of checking between two catalogs. You can specify the checking level according to your requirements. To do this:

1. Click File > Options.
2. In the Merge Catalog box of the Options dialog, specify the checking level as required.
   - Identify all differences
     The Catalog Doctor will check for differences between the two catalogs. All the resources of the report are displayed in the Merge dialog with all conflicting resources marked.
   - Identify critical differences
     The Catalog Doctor will check for any differences that may cause the engine to fail to run a report. All the resources of the report are displayed in the Merge dialog with any critical conflicting resources marked.
   - Ignore differences
     Does not show the differences between the two catalogs. Any conflicts will remain in the target catalog.