Creating a chart report

Assume that you have already opened a report set, to create a chart report within it:

  1. Do either of the following to open the New Report dialog.
  2. In the dialog, specify the title of the report, select the Chart Report layout and click OK. The Chart Report Wizard will then be displayed.
  3. In the Data screen of the wizard, specify the dataset on which the chart will be built.

    Note: If you want to create the chart on an HDS, pay attention to the unique features of HDS. For details, refer to Developing reports from HDS.

  4. In the Type screen, specify the type of the chart according to your requirements.
  5. In the Display screen, add the required fields from the Resources panel to be displayed on the category (X) axis, series (Z) axis, and value (Y) axis of the chart, and define the sort order, special function and Select N condition of the fields if required.

    Notes:

    • If you specify to create a pie chart, you can add several fields to its value axis as long as the fields are of Numeric type. However, you can add formulas and DBFields to the axis at the same time, but when a summary has been added to the axis, no other DBFields or formulas can be added.
    • If you have defined a subtype of the Stock type, you should add fields for the subtype in the order indicated by the subtype name, e.g., if you define the Open-High-Low-Close 2-D subtype, then you should add four fields to the Show Values box for this subtype, and arrange them to the order of Open-High-Low-Close by clicking the buttons and .
  6. To apply some filters to the chart so as to reduce the data displayed in the chart, go to the Filter screen and define the filter conditions as required.

    To define a filter condition, click the Add Condition button to add a condition line, then from the field drop-down list, select the field on which the filter will be based, set the operator with which to compose the filter expression from the operator drop-down list, and in the value combo box, type the value of how to filter the field or select the value from the drop-down list.

  7. In the Layout screen, with the Data category selected in the Options list box, you can specify the category/series start and end offset, whether or not to reverse the category/series field value sequence, and whether or not to swap groups. Besides, you can set whether or not to show the titles, axes, walls, gridlines, and legend. If yes, set the titles for the chart, the category axis and the value axis according to your requirements. If you choose not to display a certain axis, the labels and tick marks along the axis will be hidden as well.
  8. In the Style screen, specify the style of the chart, and if required, click the Page Setup button to set the page settings.
  9. When done, click Finish to create the report.

See also:

See an example: The SampleComponents catalog, included with JReport Designer, contains reports that have examples of report layout types. For the chart report layout example, open <install_root>\Demo\Reports\SampleComponents\Chart.cls.