Working with Columns

To add a column to a table, right-click the column and choose Create Column After, Create Column Before, Create Column at the Beginning, or Create Column At The End.

Column Right-Click Menu

By default, when Jaspersoft Studio adds a column to a table, the new column inherits the properties of the other columns in the table.

A column can be dragged to any position, inside or outside of a group. Columns can also be moved within the same section by dragging the nodes that represent the columns in the Report Inspector.

To remove a column, right-click the column and choose Delete Column from the menu. The remaining columns automatically move to the left to fill the empty space. Switch to the Main Report Design view to reposition the table in your report.

Column Groups

A column is composed of a set of cells, one for each section of the table. In order for a header cell to span several columns, we have to create a column group. The group must contain one or more columns and can contain other column groups. It also provides an additional header cell for each section of the table except for the detail section. These new header cells span all the columns of the group.

“Simple Column vs. Column Group” shows a simple column and a column group. On the left is a simple column. On the right is a column group with a header cell (the violet one) that spans the columns. This new group header cell does not replace the table header cell or the individual column header cells; those header cells remain.

Simple Column vs. Column Group

If a column group is selected, the group acts as a single big column when it is dragged. If a column is the only column in a group and the column is dragged out of the group, the column becomes a simple column and the remaining group cells are deleted.

When you create a column group, every column section gets a group header, as shown in “Group headers”, but you can remove unnecessary ones. On the left of the figure there are two columns (most of the sections in the columns have only one record; one section has two records). When the columns are grouped, each column section gets a group header, as shown in the center. However, most of the group headers are unnecessary, so their heights have been set to zero to hide them, as shown on the right.

Group headers

Version: 
Feedback
randomness