Organizing elements in a table
Use a table to display dynamic data in a row-and-column format. Dynamic data is data from a data source, such as a database or XML document. The data is dynamic because the values are not fixed in the report design. Instead, when the report runs, the report connects to the data source, retrieves the specified data, and displays the current data.
Figure 6‑7 shows an example table that displays customer names and phone numbers from a data source.
Figure 6‑7 Table data in a generated report
When you place a table on the page, the layout editor displays a row-and-column structure, such as the one shown in
Figure 6‑8.
Like the grid, the table layout automates the task of aligning report elements. Unlike the grid, the table iterates through all the data rows that a data set returns to display the dynamic list of data.
Figure 6‑8 Row-and-column structure of a table
Note that a table can display data from one data set only. When you create a data set, ensure that it returns all the data that you want to display in a table. If the data that you need is stored in two database tables, write a query that joins the two tables. Alternatively, create two data sets and use two tables, one table for each data set.
Deciding where to place elements in a table
The table contains three types of rows in which you place report elements.
Table 6-2 describes the types of information that you typically place in each row.
Table 6-2 Table row descriptions
Table row | Description |
Header | Elements that you place in the header row appear at the beginning of the table. If the data in the table appears on multiple pages, the contents of the header display at the top of every page. You can display the header contents only once, at the beginning of the table, by turning off the table’s Repeat Header property. Place elements in the header to display the following:  A title  Column headings, such as Customer Name, Address, and Phone, above the data in a customer list  Summary information, such as the number of customers in the list |
Detail | Elements that you place in the detail row represent the dynamic data in the table. The detail row displays each row from the data set. For example, display the main data, such as customer names, addresses, and phone numbers, in a customer list. |
Footer | Elements that you place in the footer row appear once, at the end of the table. For example, display summary information, such as totals. |
Figure 6‑9 shows a table layout for displaying a list of customer names and their phone numbers. The finished report displays the list that appears in
Figure 6‑7.
Binding a table to a data set
When you place a data set field in a table, BIRT Report Designer:

Binds, or associates, the data set with the table. By binding these items, the table has the information that it needs to iterate through the data rows that the data set returns.

Creates a column binding, which binds the data set field with a named column.

Creates a data element that uses the column binding to display data from the data set field.
You can view this binding information on the table’s binding properties page. To access this information, select the table, then choose the Binding tab at the top of Property Editor. Figure 6‑10 shows the binding properties page.
You can also use this page to bind a table manually to a data set. The easier approach, however, is to place a data set field in the table and let BIRT Report Designer do the binding. If you are not placing data set fields in the table, but are inserting other types of elements, such as dynamic text elements or image elements that need to access data set data, then you need to manually bind the data set to the table before inserting those elements in the table.
A table can be bound to only one data set. BIRT Report Designer prevents you from inserting a field from a different data set. If you change the data set binding after you place fields in the table, you need to delete the fields because the table no longer has information about them.
If you do not change the data set binding, and you delete all the fields from a table, the table maintains its binding to the data set. To insert fields from a different data set into a table, you need to change the table’s data set binding first. Deleting all the fields from the previous data set does not remove the original binding.