Linking resources and catalogs
A resource such as a report or a library component can be linked with a catalog in JReport. The benefits of a linked catalog compared to a copied catalog are:
- There is no need to also copy the wanted catalog to the destination directory when saving the resource to a different location.
- When the resource and its linked catalog are not in the same directory, the resource can still run with the catalog.
- When the linked catalog is updated, the resource using the catalog can run with the updated version. However, the copied catalog cannot be updated if its original catalog is updated since they are two independent versions.
When directly running a resource, the linked catalog has higher priority than the catalog specified in the same folder as the resource (without linked catalog, the resource will run within the selected catalog in the same folder). As for Advanced Run and Schedule, the default selected catalog is the linked catalog if there is one, however, you can change it by the provided option Select Another Catalog.
Setting linked catalog
Linked catalog can be set at server level, folder level, and resource level as follows:
- To set linked catalog at server level (this can only be done by administrators):
- Go to the JReport Administration page, click Configuration on the system toolbar and select Advanced from the drop-down menu.
- In the Advanced panel, check Enable Linked Catalog, then click the Select Another Catalog link to specify the catalog which will be used as the linked catalog at server level.
- Click Save to save the change.
- Restart JReport Server to make the settings take effect.
- To set linked catalog at folder/resource level, go to the Properties dialog of the folder/resource, check Enable Linked Catalog, then specify the linked catalog as required.
- Use Specified - If checked, you can specify a linked catalog which can be any catalog in the server resource tree to the folder/resource.
- Use Inherited - If a linked catalog has been specified on the parent level of the folder/resource, you can use the parent-level linked catalog as the linked catalog of the folder/resource. For the My Components, Public Components, My Reports, and Public Reports folders, the parent level is the server level; for the other folders or resources, the parent level is the parent folder.
Notes:
- If a schedule task has been submitted and then the linked catalog in use is modified, the task will still use the previous catalog until the task information is updated.
- When running a page report or web report in Report Studio, you can also save the original catalog as a linked catalog when saving the report.
- The saved visual analysis templates are linked to their original catalogs. However, currently visual analysis templates themselves cannot be customized to link to a different catalog.