The Table Component
The Tablecomponent can be created by dragging it from the Report Design Palette, or by simply dragging a Data Source from the Key Browser to a page in your report. A new Table with no bound Data Key is fairly simple looking, but hides a wealth of functionality. When you create a table, by default, you will see a basic table like the image below on the report page. It says "Object Details" because it has not yet been set up to use a Data Source.
Once you have your dataset, you're probably thinking about how to display that data in a report. To best understand how to use a table to illustrate your data in a report, you need to have a basic understanding of how the report table works.
Anatomy of a Table
A table has multiple sections, each with its own properties. By default, a Table consists of three sections:
- Table Body - Parent section of a table is (actual / entire Table)
- Table Rows - Containers for the Text Shapes. There are three types of table rows: Header, Details, and Summary. More information on these row types can be found on the Table Rows page.
- Text Shapes / Cells - Similar to the standalone Text Shape component, Text Shapes are embedded directly into the rows on a table. In Reporting, Text Shapes are commonly referred to as cells.
Text Shapes or Cells
If you're look in the Project Browser tree, you'll notice a node called 'Text Shape.' In Reporting, the Text Shape can also be called a 'cell.' For the sake of clarity, Text Shapes will be referred to as 'cells,' unless we are referring to a Text Shape component.
Each section (i.e., Table, Rows, and Cells), when selected, has its own unique properties (shown below), along with some common basic properties that appear in the Properties tab of the Property Inspector. Refer to the Table page in the Appendix for a complete list of all Table properties.
Column Count vs Column Count
When modifying properties on a section of the Table, always pay attention to which section you selected. Some property names on one section may look similar to properties on a different section. For example, Table Rows have a Column Count property that adds a new column to the row, but the Table Body section also has a Column Count property that will cause the same table to spill out horizontally on the same page causing some of the data to be rendered on an unprintable area of the report!
When you first drag a table into the Design panel of your report, the Configure Table tab will appear in the Property Inspector. You will see that it has a default Data Key of "Objects", which matches the Details row in the table. The first step when configuring your table is to drag your Datasource from the Key Browser to the Data Key field in the Configure Table tab. Changing the Data Key will also change the label on the Details row making it easier to determine what you are looking at when editing multiple tables or Groupings. Depending on how you want to present your data, you may also want to add Header and Summary Rows.
Once you add a Data Key to your table, you can start designing. There are many tools built into the Table interface that you can use to help you layout and organize the data in your table. Now all you need to do is decide how you want to organize and display the data in your report.
If you have a lot of tabular data, you probably want to use a Standard row. You might start by simply dragging your Data Keys from the Key Browser to columns in your Details row. Then, you might give each Header column a label. If you have a bunch of numbers that you want to add together, you can create a Summary row using the 'total' built-in key. Lastly, you might want to make some cosmetic changes to the font size, font color, changing the Header row from structured to unstructured so you can add an image, chart, etc. The design possibilities are endless!
The following example shows the basic anatomy of a table with data populated in the Header, Details, and Summary rows. Once your finished designing your report, go to the Preview panel and check your results. You can continue to go navigate between the Design and the Preview panel making changes until you get your report just right!
Editing a table can be a little tricky. There is no 'undo' command to remove any formatting changes you made to a table during an editing session. Consequently, if you use the 'Undo' icon in the menu bar to remove any edits, it may mess up your row and cell formatting. When editing a table, it's best to save frequently, and if you need to undo any edits, Exit your project and reopen it to return to the last version of your table.
Report Tables have very powerful
The Reporting engine will automatically create new pages to fit all data within the Table's boundaries while applying formatting preferences each step along the way such as font, size, layout and alignment. Combine that feature with powerful data manipulation and expressive layout tools, and you get an object that often forms the basis of your reports.
With Dataset Grouping, you can break tables down by data keys that share a common value. Tables support an arbitrary level of groups, and each group can have its own Header, Details, and Summary rows. Additionally, the keys from 'Show Calculations' and other keychain functions are supported for any level of grouping.
Report Table Features
Tables have a lot of built-in features that give reporting users the ability to create simple tables to exceedingly complicated tables. The list of table features is quite extensive. Once you get familiar with all the report table features, you can easily design professional tables for your reports.
Table Rows allow you to flexibly layout and organize tabular data in a table. There are three types of table rows; Header, Details, and Summary rows that make up a body of a table. When using a table in a report, you can group data in the table by a specific column giving reporting users the ability to flexibly layout and organize tabular data.
The different types of rows can be independently enabled for each level of Grouping, and for each table in a Table Group. Additionally, Table Row Versioning gives you the option of conditionally displaying rows with a different format to make them stand out. A row can also be structured or unstructured. A structured row having a variable number of columns, and unstructured row having no columns so you can add images, charts, data, and text shapes anywhere in the row.
Table Row Versioning
Table Row Versioning allows you to conditionally display rows of data in different formats. It is used to make certain data standout. It allows you to do things like create alternate background colors, or make the first row different, or show negative valued rows differently. You will see a list of your existing row versions (only one named "Standard" appears first in the list) followed by options to add new row versions. When creating new row versions, the currently selected row will be duplicated as the new row version. From here, you can modify your row in any way. You can make it similar to the Standard row or completely different. Once you added a few row versions, you can swap between them by selecting one from this list.
To use Row Versioning, click on the word "Standard" on the far right of a row. Row versions are either Built-in or Custom, and may be specified with a version key expression. They are applicable to Header, Detail, and Summary Rows.
When having a table in a report it is possible to have each row look different. Under Standard you have some options to create a new row version as well as removing existing ones. The table will alternate between the standard row version and the alternate row version. (adding color to a row)
Chart Inside of Tables
Adding charts inside of tables provides a lot of flexibility designing reports as well as displaying and organizing data in a report. The most common way of adding charts inside tables is using an unstructured row and placing the chart inside the row. Unstructured rows are highly customizable allowing you to place charts anywhere within the row of the table.
There are two common locations to place a chart inside a table:
- Using a Header followed by a chart component.
- Using a Details Row followed by a chart component.
It is very common to add a chart after an unstructured Header row because it's likely that a chart will be at the top of the first page of a report. An unstructured Details row typically works best when used in conjunction with Grouping Data Inside of Tables or Nested Queries so that each row has a chart with data from that group or query.
Grouping Data Inside of Tables
When using a table in a report, you can group data in the table by a specific column giving reporting users the ability to flexibly layout and organize tabular data. With Dataset Grouping, you can break tables down by data keys that share a common value. Tables support an arbitrary level of groups, and each group can have its own Header, Details, and Summary rows. Additionally, the keys from 'Show Calculations' and other keychain functions are supported for any level of grouping.
When using a table in a report its possible to group the data in a table by specific column.
Table Groups - Table grouping is an easy way to add multiple datasources to the same table component.
Table grouping is an easy way to add multiple datasources to an existing Table component showing the results in one report. There are two types of Table Groups you can create within a Table component: Peer Tables and Child Tables. Peer Table groups allow the second table to begin exactly where the first table ends. If multiple tables are used, they can be configured as multiple page templates, providing a page break between tables. Child Table groups allow you to nest one table inside another. What's really nice about Table Groups and Nested Data Sources is that you can create Summary Tables for categories of items or drill-down charts all in one report.
Other Table Components
There are a few other tables in the Report Module, and they all behave a little differently. Selecting the right table depends on the type of data you have and how you want to display it.
- Simple Table - a basic table that has a set number of rows and columns that you can put static or dynamic values. You cannot use keys from a dataset in this table.
- Labels - primarily used for printing sticker labels for inventory tracking or other systems. These reports are usually sent to a printer.
- CrossTab - a table used for displaying data with two groupings (i.e., machine_name and downtime_entry) to correlate data. This table will stretch both its height and width to accommodate the underlying dataset.