Obtaining detailed information from a banded object

In a banded object which contains group information, you may only care about the details in a certain group. To meet your expectation, JReport provides a function: go-to-detail.

Going to detail from a field/label/image

If a banded object contains group information, then a field (DBField, parameter, formula, summary, special field), label, or image in a group header/footer panel of the banded object, including the case that the field, label or image is in a tabular cell or text box which is in the banded object's group header/panel panel, can be used to obtain information of that group. To do this:

  1. In JReport Designer, open a page report which contains a grouped banded object.
  2. Select the object which will be used for going to detail, set its property Go to Detail to true in the Report Inspector.
  3. Find the property Detail Target Frame, then from its value drop-down list, select the target window or frame in which to display the detailed information.
  4. Publish the page report to JReport Server and run it in Page Report Studio.
  5. Right-click the object and select Go to Detail, then the related group information will be displayed.

Going to detail from a map

A map in a grouped banded object can also be used for going to detail with the following preconditions:

To go to detail from a map:

  1. In JReport Designer, open a page report which contains a grouped banded object with a map.
  2. Select the map, then in the Report Inspector set its property Go to Detail to true, from the Detail Target Frame value drop-down list, select the target window or frame in which to display the detailed information.
  3. Publish the page report to JReport Server and run it in Page Report Studio.
  4. Right-click the map and select Go to Detail, then the related group information will be displayed.

Going to detail from a chart

A chart in a banded object can also be used for going to detail, however, some preconditions must be met:

The following example shows how to obtain detailed information from a chart:

  1. Create a standard banded report based on the query WorldWideSales in Data Source 1 of the catalog file SampleReports.cat. The standard banded report displays the following fields: the DBFields Product Name, Unit Price, Discount and Quantity and the formula Total, is grouped by Country, State and Category (Country is the highest level and Category the lowest), and applies the Classic style.
  2. In the Resource View panel, click <Add Summary...> from the Summaries node and create a summary named Sum_Total, which uses the function Sum, sums on the formula Total, and applies to the Category group level, then drag the summary to the footer panel of the Category group level in the banded object.
  3. Insert a Bar 3-D chart into the header panel of the Country group level. The chart inherits the dataset from the banded object (make sure to check the Current radio button in the Data screen of the Create Chart wizard), and displays Category on the category axis, State on the series axis and Sum_Total on the value axis.
  4. In the Report Inspector, select the node that represents the chart from the resource tree and set its Go to Detail property to true.
  5. Save the report and click View > Preview As > Page Report Result to preview it in Page Report Studio.
  6. Turn to page around 25 to view records in the USA country.

  7. Now point to the bar of State=CA and Category=Bold, the mouse pointer will become a hand. Click the bar and the result will be regenerated.

  8. If you click a label on the category axis of the chart, you will go to detailed information concerned with the product category represented by that label; if you click a series axis label, detailed information about the state indicated by the label will be displayed.

Notes: