#### Adding elements

You can add more elements to a business/report cube at any time to suit your requirements.

##### Adding a category

To add a category, follow the steps below:

1. In the Business/Report Cube Editor window, select the business/report cube (or any existing category) in the right panel, right-click and then click Add Category to display the Category Property dialog. See the dialog.

2. In the General tab, set the name and display name for the category in the Name and Display Name text fields and type a comment if required.
3. Click the Security tab and set permission to the category as required (for details, see Configuring security).
4. Click OK. A new category will be added to the business/report cube (or a selected category). You can then add cube elements to it according to your requirements.

##### Adding a cube element

To add a cube element, take either of the following two ways:

- Adding via dialog
  1. Select the business/report cube or a category into which to add the cube element, right-click it and then select Add Cube Element from the shortcut menu to bring up the Add Cube Element dialog. See the dialog.

  2. In the General tab, decide the type of the element by selecting the corresponding item from the Type drop-down list. It can be Dimension, Measure or Detail Info.
  3. Specify the name and display name of the cube element in the Name and Display Name text fields accordingly.
  4. Click the chooser button next to the Mapping Name text field to specify the mapping field of the cube element.
  5. If you choose to create a measure object, click the Aggregate drop-down list to specify the aggregate function for the object.
  6. Specify the prompt and description of the cube element.
  7. Click the Security tab and set permission to the cube element as required (for details, see Configuring security).
  8. When done, click OK to close the dialog.

  Note: If you want to add a detail information object to a dimension or measure object, you can right-click the dimension/measure object, select Add Detail Information from the shortcut menu and then add the detail information object as required.

- Adding by dragging

  In the Business/Report Cube Editor window, drag a table, DBField, formula or summary from the Resource Objects panel to the business/report cube or a category. Then, all DBFields in the table, the DBField, formula or summary will be added as cube element into the business/report cube or that category. JReport will determine their cube element type automatically. Moreover, you can drag a DBField of the data type other than Integer and Date or a formula to a dimension or measure object to add it as a detail information object.

Notes:

- For all the elements in a business/report cube you can,
  - Edit and rename them at any time according to your requirements by right-clicking an object and selecting the corresponding editing command from the shortcut menu.
  - Delete them if required by choosing Delete from the shortcut menu, clicking the Delete button on the toolbar, or dragging them from the right panel to the Resource Objects panel.
- For a report cube, if you want to enable data analysis on a component with it for components designed in JReport Designer and then published, you must add the corresponding cube elements for all fields in the component, that is, each group field (column/row field in crosstab or category/series field in chart) has a corresponding dimension object, each detail field has a corresponding dimension/measure/detail information object, and each summary/aggregate field has a corresponding measure object (matching the aggregate function and field both).
- From Version 9 on, the display names of the cube elements in a category must be unique, and the category display names also should be unique in a business/report cube. Then, when you load a catalog which was created in previous version in JReport Designer 9, if the catalog contains business/report cubes that have duplicate display names, the Rename Duplicate Display Name dialog will be displayed for you to rename the duplicate names.