## Creating a summary

To create a summary in a catalog, follow the steps below:

1. In JReport Designer, open the required catalog, then in the Catalog Browser, expand the data source in which you want to create the summary.
2. Right-click the Summaries node and click Add Summary on the shortcut menu. The New Summary dialog displays. See the dialog.

3. Select <Create> in the Summaries drop-down list.
4. Select a function from the Function list for your field to be summed by.
5. Select a field for the summary to compute from the Resource box. Then click next to Sum On.
6. If required, specify to which group the summary will be applied.
   - If Static Summary is checked, select the field from the Resource box and then click next to Group By. And if the field you select is of Numeric/String/Date/Time type, you can further specify to which level the data will be grouped by by selecting a special function from the Special Function drop-down list. If Customize is selected, you can set the function by your own in the Customized Function dialog.
   - If Dynamic Summary is checked, first select Up or Down from the drop-down list, then in the combo box, select a value or input an integer, which should be between 0 to 127, to specify the group on which the summary will take effect.

     For example, if you select Up or Down and input 0 in the combo box and insert this summary into any group, the summary will take effect on this group; if you select Up and input 1 and insert this summary to a group, the summary will take effect on the group higher than the group where the summary is inserted, and if you specify Down and 1, it will take effect on the lower group; and the rest may be deduced by analogy.

     Notes:

     - If the dynamic summary is to be used in a chart, when defining the summary, you must choose Down from the Group By drop-down list; if it is to be inserted to other data containers, the summary must be defined on Up level.
     - When you insert a dynamic summary into a report and there is no corresponding group level to match settings of the dynamic summary, an error message will be generated.
7. Click the Apply button to add the new summary to the catalog. The Summary Name dialog will then be displayed, asking you to name the summary. Enter a name as required, and then click OK.
8. Click the OK button in the New Summary dialog to close the dialog.