### Converting between components

Converting between components enables you to view and analyze data from different aspects with different focuses. In JReport Web, you can convert a crosstab into a chart and vice versa, however, if a crosstab/chart is designed in JReport Designer, to enable the conversion, you need to make sure that data objects used by the crosstab/chart can be converted to corresponding cube elements (see the note in Analytic reporting for details).

#### Converting a crosstab into a chart

To convert a crosstab into a chart:

1. Click anywhere in the crosstab, when the icon appears at its upper left corner, click the icon to select the crosstab, then do any of following:
   - Right-click the icon and select To Chart from the shortcut menu.
   - Click Menu > Report > To Chart.
2. The Convert Data Fields dialog may appear for your confirmation on converting data fields of the crosstab to cube elements of a business/report cube. Click OK to confirm, and the To Chart dialog will be displayed.
3. In the Chart Type tab, specify a suitable type for the chart. With a certain type specified, you can further define the chart as a combo chart by clicking <Add Combo Type> in the Chart Type Groups box.
4. In the Display tab, the Resources box lists all the cube elements used in the selected crosstab including dimension and measure object(s). The chart can only be defined based on the cube elements listed. Add a dimension object from the Resources box to the Category box, and so to the Series box, and measure object(s) to the Show Values box respectively.
5. In the Style tab, set the style for the chart as required.

   If the crosstab is in a table or banded object, by default, the chart converted from the crosstab will take on the style of the table or banded object. If you want to apply another style to the chart, uncheck the Inherit Style option and choose the desired style in the Style box.

6. Click the OK button to finish the conversion.

#### Converting a chart into a crosstab

To convert a chart into a crosstab:

1. Click anywhere in the chart, when the icon appears at its upper left corner, click the icon to select the chart, then do any of following:
   - Right-click the icon or any part of the chart except for the legend and label, then click To Crosstab on the shortcut menu.
   - Click Menu > Report > To Crosstab.
2. The Convert Data Fields dialog may appear for your confirmation on converting data fields of the chart to cube elements of a business/report cube. Click OK to confirm, and the To Crosstab dialog will be displayed.
3. In the Display tab, select a dimension object in the Resources box and click to add it as a group field to the Columns or Rows box; select a measure object and click to add it as an aggregate field to the Aggregates box. Repeat these to add more aggregate fields.

   In the Display Name column, you can edit the display name of a group field or aggregate field, and the Sort columns allow you to specify a sorting manner on a group field.

   If you want to remove any group/aggregate field, select it and click .

   To adjust the order of group/aggregate fields, select a group/aggregate field and click or .

4. In the Style tab, apply a style to the crosstab as required.

   If the chart is in a table or banded object, by default, the crosstab converted from the chart will take on the style of the table or banded object. If you want to apply another style to the crosstab, uncheck the Inherit Style option and choose the desired style in the Style box.

5. Click OK to finish the conversion.