### Manipulating data components

You can manipulate data components, which refer to crosstabs, tables, banded objects, charts and geographic maps, in Page Report Studio as shown below. However, most of the manipulations require selecting the component first. To select a component, click anywhere in the component, when the icon appears at its upper left corner, click the icon.

Note: When manipulating data components, a JReport Live license for JReport Server is required in order to use the features involving business view or changes of report template. If you do not have the license, contact your Jinfonet Software account manager to obtain it.

#### Setting the number of records retrieved by data components

You can set the number of records that can be retrieved by all data components in a report. To do this, select a value to your liking (All or first 50 to name a few) from the Max Records combo box on the Analysis toolbar. You can also directly input a positive integer here and press Enter to retrieve the corresponding records. Alternatively, you can click Menu > Report > Max Records to show the Max Records dialog, and then achieve the same goal. If you are making a lot of changes to the report, it may be faster to limit the number of records to 1 page while you make the changes then change it back to All to view the final result.

#### Manipulating a crosstab

- Changing the group index in a crosstab
  The group index in a crosstab can be modified, namely, you can move a group to a higher or lower level. This operation can be performed on crosstabs containing two or more groups. To do this, you can simply drag a group object (row/column header) to the required destination till a blue line appears. You can also drag a column header to a row level and vice versa.
- Rotating a crosstab
  Columns and rows in a crosstab can be exchanged. This operation is called rotating a crosstab.

  To rotate a crosstab, first select it, and then do one of the following:

  - Click Menu > Report > Rotate Crosstab.
  - Click the Rotate button on the Analysis toolbar.
  - Right-click the icon of the crosstab and select Rotate from the shortcut menu.
- Expanding/Collapsing a crosstab
  For a crosstab, if it has more than one row/column group level, you can specify whether or not to enable the crosstab to be expanded in Page Report Studio, and set the default expanding/collapsing state of groups in outer levels. For details, see Expanding/Collapsing a crosstab in the JReport Designer User's Guide.
- Adjusting the width of crosstab fields according to the contents
  When the contents in the field of a crosstab need more space to completely display, you can adjust the width of the field according to its contents. To achieve it, first select the field, then right-click on it and select Autofit from the shortcut menu.
- Inserting aggregate fields by dragging
  You can drag and drop fields (detail fields, aggregation fields, and dynamic formulas/aggregations) from the Resource View panel to a crosstab to add them as aggregate fields to summarize data in the crosstab.
  1. Click Menu > View > Resource View to open the Resource View panel if it is not displayed.
  2. Drag the required field and move the cursor above or under the desired subtotal or grand total cell, then release the cursor.
     - If the selected field has been predefined with an aggregate function,
       - When you have specified any labels to label the columns/rows/summaries in the crosstab while creating it with the report wizard, the Insert Aggregation dialog appears. You can specify a label to label the newly created summaries if necessary. Click OK and the field is inserted to the specified position.
       - When the crosstab has no column/row/summary labels, the field is inserted into the specified position directly.
     - If the selected field has no predefined aggregate function, the Insert Aggregation dialog appears. From the Aggregate Function drop-down list, select the function to summarize the field, then input a label to label the newly created summaries if necessary. Click OK and the field is inserted to the specified position. However, whether the label you specify would be generated depends on if you have added any labels to label the columns/rows/summaries in the crosstab while creating it with the report wizard. If no label is defined in the report wizard, the label you add in the Insert Aggregation dialog will be ignored.

  After an aggregate field is added in a crosstab by the drag-and-drop way, if the field from which the aggregate field is created has no predefined aggregate function, you can switch the function the aggregate field uses at anytime. To do this, right-click it and select Switch Aggregate Function from the shortcut menu, then choose a new function from the submenu.

#### Manipulating a table

- Adjusting order of columns in a table
  The order of columns in a table can be easily adjusted. To do this, drag a column header to the left or right boundary of another column header, when a blue line appears along the column boundary, release the mouse button, and you will see the order change.

  The above description is for a vertical table. With regard to a horizontal table, you can do the same actions on its row headers.

- Adjusting grouping order in a table
  A table may contain several group levels. The order of the group levels can also be adjusted. To do this, drag a group field value to the required position until a blue line appears.
- Hiding/Deleting table columns
  A table column (for a horizontal table, the "column" corresponds to a field row) can be hidden or removed. To do this, select the cell of the column in the table header and right-click, then select Hide Column or Remove Column from the shortcut menu, and the column will be hidden or removed from the table.
- Showing table columns
  You can specify which columns will be shown in a table. To do this, right-click the icon of the table, then on the shortcut menu, check the names of the columns you want to show from the Show Column submenu.
- Adjusting the width of table columns according to contents
  When the contents in cells of a table column need more space to completely display, you can adjust the width of the table column according to the contents. To do this, right-click the cell of the column in the table header, then select Autofit from the shortcut menu.
- Changing group direction
  You can make the group headers that are placed horizontally in a table to be displayed vertically. To do this, right-click the group header row and select Vertical to Detail from the shortcut menu. In addition, if the first column of a table is group column, you can specify to place the group column horizontally in a table. To do this, right-click the cell of the group column in the table header, and select Horizontal to Detail from the shortcut menu.
- Rotating a table
  You can rotate a table to switch its appearance between the horizontal and vertical layout modes by doing one of the following:
  - Click Menu> Report > Rotate Table.
  - Click the Rotate button on the Analysis toolbar.
  - Right-click the icon of the table and select Rotate from the shortcut menu.
- Inserting table columns
  You can insert a new column in a table and it could be a common column, detail column, summary column, or group column.
  - To insert a common column into a table:
    1. Right-click any cell in the table header, or right-click the icon of the table.
    2. On the shortcut menu, click Insert > Common Column.
  - To insert a detail or summary column into a table:
    1. Right-click any cell in the table header, or right-click the icon of the table, then select Insert > Detail Column/Summary Column from the shortcut menu.
    2. In the corresponding insert column dialog, specify the resource you want to use for the new column, then click OK.
  - To insert a group column into a table:
    1. Right-click any cell in the table header, or right-click the icon of the table, then select Insert > Group Column from the shortcut menu.
    2. In the Insert Group Column dialog, select the group object you want to use for the new group column from the Resources box and click to add it as the group by field, then specify the sorting direction of the group in the Sort column.
    3. Specify the positions of the group by fields: Group Above, Group Left Above, or Group Left.
    4. Repeat the above steps to add more groups if required.
    5. Click OK to insert the columns.

       The next time when you open the Insert Group Column dialog to add more group columns, all the added group by fields will be listed in the dialog. You can choose to remove or edit them if required.

  Note: If you right-click any cell in the table header and use its shortcut menu to insert a common, detail or summary column, the Insert Column dialog will appear for you to specify the position of the column to be inserted, which can be before or after the column in which the cell you click on is, however, if you use the table shortcut menu to insert the column,

  - If it is a common column, the column will be inserted as the last column in the table.
  - If it is a detail/summary column, the column will be inserted after the last detail/summary column, or as the last column in the table when there is no detail/summary column.
- Converting table columns
  You can convert a group column into a detail column, and vice versa.
  - To convert a group column into a detail column, select the cell of the group column in the table header, right-click and select Convert to Detail from the shortcut menu, then the conversion is done.
  - To convert a detail column into a group column:
    1. Select the cell of the detail column you want to convert in the table header, right-click and select Convert to Group from the shortcut menu.
    2. In the Select Group Position dialog, specify the position for the newly converted group by field.
    3. Click OK to save the changes.
- Aggregating on a detail column
  You can summarize the data in a detail column if required. To do this:
  1. Select the cell of the detail column in the table header, right-click it and select Aggregate On from the shortcut menu.
  2. In the Aggregate On dialog, specify a function from the Function drop-down list to summarize the data.
  3. When done, click OK.
     - If the table has groups, you will find data in each group level and the whole table are summarized respectively in the column.
     - If the table has no groups, the summary will be based on the whole table.

  When you finish summarizing a detail column, you will find a dynamic aggregation object is created at the same time which is given a default name Function_DetailFieldName in the Dynamic Resource > Aggregations list in the Resources View panel and you can use it again in the current report if required.

Note: If a table is created in JReport Designer, you can add, convert columns in the table, or aggregate on its detail columns in Page Report Studio only when data fields used by the table can be converted to corresponding view elements. See the note in Analytic reporting for details.

#### Manipulating a banded object

- Hiding/Showing a panel in a banded object
  A panel in a banded object can be hidden or shown. To do this, right-click the icon of the banded object, then on the shortcut menu, click the item which indicates the panel name from the Show submenu. For a panel which is shown, the item is with a check mark, and vice versa. This operation is also applicable for hiding/showing a row in a table.
- Hiding/Showing DBFields and labels in a banded object
  The DBFields and their corresponding labels in a banded object can be hidden or shown. To do this, right-click the icon of the banded object, then on the shortcut menu, click the fields and labels you want to show from the Show Field submenu. For a field or label that is shown, it will be marked with a check mark, and vise verse.
- Expanding/Collapsing a group panel in a banded object
  Group panels in a banded object can also be expanded or collapsed. For details, see Managing the data of a banded object in the JReport Designer User's Guide.

#### Manipulating a chart

- Modifying the definition of a chart
  You can modify the definition of a chart, including the chart type, data display, and style. To do this:
  1. Right-click the icon of the chart or any part of the chart other than the legend and label to show a shortcut menu, and then select Format Chart from the shortcut menu to display the Chart Definition dialog.

     Note: In the event that the chart is built in JReport Designer, the Format Chart command will be available only when Page Report Studio can convert data fields used by the chart to corresponding view elements. See the note in Analytic reporting for details.

  2. In the Chart Type tab of the Chart Definition dialog, specify the type for the chart.
  3. In the Display tab, change the group and aggregation object used by the chart.
  4. In the Style tab, modify the style for the chart as required. If there is only one style available, this style will be applied to the chart by default and the Style tab will be hidden from the dialog.
  5. Upon finishing, click OK to apply the modifications.

  For details about how to modify the chart definition with the Chart Definition dialog, see Creating a chart report.

  In addition, if you only want to change the chart type, no matter whether the chart is originally created in JReport Designer or Page Report Studio, you can achieve it by doing one of the following:

  - Right-click the chart and on the shortcut menu, select the required type from the Chart Type submenu, which lists all the chart types and subtypes (the current one and the inapplicable subtypes are grayed out).
  - Select the chart, click the Chat Type button on the Analysis toolbar, and then select a suitable subtype from the drop-down menu.
- Formatting chart elements
  The elements (platform, paper, legend, axes and labels) in a chart can be formatted to suit your requirement.
  - To format the platform/paper/legend of a chart, right-click on the chart and select Format Platform/Format Paper/Format Legend from the shortcut menu. In the displayed dialog, specify the settings as required. For details about the format options, refer to Format Platform dialog, Format Paper dialog and Format Legend dialog.
  - To format an axis, right-click on the chart and select the axis from the Format Axis submenu. In the displayed dialog, specify the axis settings as required. For details about the format options, refer to Format Category(X) Axis dialog, Format Value(Y) Axis dialog and Format Value(Y2) Axis dialog.
  - To format a label, right-click the label and select Format Label from the shortcut menu. In the Format Label dialog, set the properties according to your requirement.

#### Manipulating geographic map group markers

- Going up/down on geographic map group markers
  - For the group level that is higher than some other group levels in a geographic map component, point to its group marker, right-click it and select Go Down from the shortcut menu to jump one group level down.
  - For the group level that is lower than some other group levels in a geographic map component, point to its group marker, right-click it and select Go Up from the shortcut menu to jump one group level up.
- Showing/Hiding geographic map group markers
  By default, all visible group markers are shown. To hide them, right-click the geographic map (not the group markers) and select Hide Markers from the shortcut menu. If you want to show them again, right-click the geographic map and select Show Markers from the shortcut menu.