User defined drilling

Besides automatic drilling, JReport provides you with custom drilling functions including support for linking to another report and for linking to a detail report, making the analysis of a report more diverse and useful.

Linking to another report

A link to another report can be bound to a field, a label, an image, or a shape map area in JReport Designer. This is useful for viewing some information related to the current report, especially with viewing a report for comparison.

To use a link in JReport Viewer:

  1. Develop a page report in which a report tab contains an object which is linked to another report in JReport Designer.
  2. Publish the report to JReport Server.
  3. Run the report in DHTML format with JReport Viewer.
  4. Click the trigger object in the report, or right-click the object and then select Link Report from the shortcut menu.
  5. The linked report will then be shown.
Linking to a detail report

In most cases, your reports will be related to each other, instead of being isolated. Each report may have a particular emphasis on one or more aspects. In some circumstances, you may want to set up certain relationships among your reports so that you can browse from one report to another through the relationship "channels" that you create.

Such an inter-report relationship network can be achieved by setting up "Anchor" and "Filter" conditions between two reports. You can use one report to hold comprehensive report data, and another to show detailed information on a specific topic.

JReport reports can be joined together to compose a master/detail report group. Normally, a master report holds more comprehensive data, while detail reports hold related detail information. A detail report can be the master report of another report. In this way, by setting up more and more pairs of master/detail reports, many reports can be joined together, and a report chain is formed.

To use master/detail reports in JReport Viewer:

  1. Develop the page reports with master/detail relationship in JReport Designer.
  2. Publish the reports to JReport Server.
  3. Run the report which contains the master report in DHTML format on JReport Server.
  4. Click the trigger object in the master report, or right-click the object and then select Detail Report from the shortcut menu.
  5. You may be prompted to provide encoding and DB security information before the report result is produced. Click OK if you want to run a detail report using the same encoding and DB security settings as that of the master report.
  6. The detail report will show only the records in conformity to the anchor and filter conditions.

Notes: