Editing Table Properties
You can edit the following on the Tables tab in the Properties view:
| • | Name – Enter a name for the table; the name appears in the Outline view. |
| • | Fit columns to table element – Select this to have the columns automatically stretch or shrink to fit the table width. |
| • | Resize the columns taking the space from the next one – Select this to configure the table so that resizing a column by moving its border means one column grows wider and the other narrower. |
Editing Table Styles
You can edit the look and feel of a table by choosing elements from the Table Styles tab. To create a style, click the new style button
. In the Table Wizard Layout window, you can select a style to add to your palette or create a new style to save to your palette.
Table Styles Tab |
![table-styles-tab.png.80ef0914955f1c3ef717f0c4e1433791.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
To edit a style in the palette, double-click the style and edit it in the Layout window. You can save it either as a new style or with the same name. To a edit table layout in the Design tab, right-click the table and choose Change Table Style.
![change-table-style.png.c2eeaeaec00621bfef1c5e25728f3ba5.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
Change Table Style |
You can also decide which table sections to create. If the dataset for the table contains groups, it can be convenient to select the Add Group Headers and Add Group Footers check boxes.
To delete a style right click it in the Table Styles tab and choose Delete Style.
Editing Cell Contents
You can edit the content, style, and size of each cell or group of cells in your table.
| • | To edit table content, double-click your table. The table opens in a separate tab inside the Design tab for your report. |
Table Editing Tab |
![table-editing-tab.png.7ca0c35d31e2a26541ab1ee49146ac51.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
| • | To edit the content and style of a cell, click the cell. Switch to the Properties view where you can edit location, size, color, style, and print details for the cell. |
Cell with Properties View |
![cell-with-properties.png.42f10dfd8f74061000d524fca243a686.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
| • | To edit the size and position of a cell, or copy or delete it, right-click on the cell and select an action from the context menu. |
Cell Right-Click Menu |
![cell-right-click-menu.png.d1bf8ef1c7837f91101b9c03bc2c4dbe.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
| • | Use Shift-click to select all cells in a row. |
The following figure is the table created in Creating a Table, after formatting and editing:
Formatted Table |
![table-formatted.png.ec47052031f9c6d4ef93e2d71b20d16f.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
Editing Table Data
You can edit the dataset used for the table by right-clicking the table and selecting Dataset and Query to display the Dataset and Query Dialog.
Dataset and Query Dialog |
![dataset-and-query-tablechapter.png.a8bcc6709dc72ec1195525523750a2e4.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
Here you can set the dataset parameters to dynamically filter the data used in the table.
Suppose, for instance, you have a report that displays order details in a table, you can use a parameter in your SQL query to specify the order ID to filter the order details.
![note-icon-ns.png.ce30a4fd14794d00642b7f6be0a009c9.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) | Unlike charts and crosstabs, a table always requires a subdataset. Tables cannot use the main dataset. |
Editing Table Source
You can also edit tables using the Source tab. In the source the tags are labeled as follows:
| • | Table: External border of the table. |
| • | Table_TH: Table header background color and cell borders. |
| • | Table_CH: Table column background. |
| • | Table_TD: Detailed cell style. Table_TD can be nested to display alternating background color for the detail rows. |
Recommended Comments
There are no comments to display.