You can merge the data from two or more columns into one column. When you merge data, the data appears on multiple lines. Merging data also enables you to include more columns in a BIRT design without exceeding the width of a page. The BIRT design on the left in Figure 6‑14 shows a report with data from the address field spanning four columns. The report on the right in Figure 6‑14 displays data from the address fields merged in a single column.
Figure 6‑14 Comparing address data displayed in multiple columns and in a merged column
How to merge data into one column
1 Press Ctrl and select each column that contains the data to merge.
2 Right‑click and choose Column➛Merge Columns from the context menu, as shown in Figure 6‑15.
Figure 6‑15 Merging columns
When you merge data from multiple columns, the column headers appear on multiple rows, as shown in Figure 6‑14.
You can improve the format by merging the column headers to remove the City, State, and Zip column headers, and editing the remaining column header title. Figure 6‑16 shows the improved format.
Figure 6‑16 A BIRT design displaying merged column headers in a single row
How to merge column headers
1 Select and right‑click the column header in the bottom row, as shown in Figure 6‑17. Choose Cell➛Merge Up.
Figure 6‑17 Merging column headers
2 Repeat step 1 until only one column header remains.
In Report Studio, the actions you can perform on a merged column include modifying font, specifying conditional formatting rules, formatting data strings, creating filters, and so on, similar to actions you can perform on an unmerged column.
When working with a merged column, select and right‑click the column, then choose a modification option. Select Data Item appears, as shown in Figure 6‑18. The drop‑down list contains a list of columns in the merged column.
Figure 6‑18 Selecting a column from the list of merged columns
In Select data, select a column for which you want to perform an action, such as formatting or filtering. Choose OK.
Perform the modification action, and then repeat the previous step for every column in the merged column that you need to modify.