Using a reference table to clarify resource relationships

With the development of reports and catalogs, the relationships among the catalog resources may become increasingly complicated. You might be wondering if and where an SQL or a formula is used by a resource in a catalog or report. You might hesitate to rename a resource because you don't exactly know what other resources are currently using it and, if you rename it, what result it would cause. To help you manage catalog resources, JReport provides you with a tool - the reference table.

JReport monitors the resource reference information in the catalog and stores this information in the reference table. You can select the resource types that can be registered in the reference table.

With the reference table, when you rename a resource object, JReport Designer will scan the reference relationships between it and other resource objects. It will then prompt you to update the changes in the resources that are referencing the object, helping you reduce the risk of resource not applicable.

Most resources in the catalog can be included in the reference table, such as connections (tables, views, stored procedures, SQLs, queries, report cubes, and business cubes), user data sources, hierarchical data sources, formulas, summaries, parameters, and reports.

This section describes the usage of the reference table as follows:

Configuring the reference table

Before JReport can start to monitor and record the resource reference information in the reference table, you must first have the reference table configured. In the Reference Table Configuration dialog, you can choose the resource types that are to be added to the table. Then, JReport will monitor the reference relationships among objects of these resource types, and store the relationship information in the database.

To configure the reference table:

  1. On the Catalog Browser toolbar, click the Configure Reference button to open the Reference Table Configuration dialog. See the dialog.
  2. Check the data sources you want JReport to monitor in the Data Source box.
  3. In the Catalog Resource Types box, check the resource types that are to be added to the reference table.

    In order to improve product performance and provide you with more flexibility, JReport allows you to choose the resource types that you want to monitor by yourself. Note that JReport will only monitor the referencing relationships among the resource types that you have selected. The resource types that have not been selected will not be monitored, even if they may have referencing relationships to the selected resource types. Therefore, if you are not sure that the resource types you have selected hold all the possible reference relationships within themselves, it is recommended that you select as many resource types as possible to avoid incomplete information.

    For example, in the Reference Table Configuration dialog, selecting only the formula resource type means that for a formula, only the formulas referencing this formula will be recorded in the reference table, although other resources, such as queries, summaries, and reports which are also using this formula will not be shown in the reference table. If you rename this formula, you will only be prompted to update the change in the formulas using it, ignoring any other resources also using it.

  4. Click OK. The referencing relationships among the objects of the checked resource types will then be monitored.

Viewing a resource object's referencing relationships

After you have configured a reference table, you can view the referencing relationships for a specific resource object. To do this:

  1. In the Catalog Browser, browse to the resource object with the reference relationships that you want to view.
  2. Right-click the resource object, and then click Reference Entities on the shortcut menu.
  3. The Reference Entities dialog will then appear, listing all the catalog entities that are using the selected resource object.

Note: In the Reference Entities dialog, you can right-click any of the query, formula, parameter or summary entity which uses the specified resource object to edit it, and right-click any report entity to open the report.

Refreshing and exporting the reference table

The reference table information is stored in a database, which provides reliable stability. However, in some circumstances you may need to refresh the reference table to retrieve the correct reference relationship information. To refresh the reference table, on the Catalog Browser toolbar, click the Refresh Reference button .

You can also export the reference table information to a text file. To do this:

  1. On the Catalog Browser toolbar, click the Export Reference button .
  2. In the Save Reference dialog, specify the location where you want to save the file.
  3. Click Save to save the file.