Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

 

Overview

Tables are a major part of Ignition Reporting.  They are composable and highly flexible, giving Reporting users the ability to flexibly layout and organize tabular data. 

Tables are objects that display data in a structured, repetitious format. Their complexity can range from trivially simple to complicated, but fundamentally they do the same thing - take the data given to them and repeat it in a structured way for each row of the data provided. The Reporting engine will automatically create new pages to fit all data within the Table's boundaries while applying your 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.  

We'll start by looking at the various parts of the base Table component and move into more features including some examples.


On this page ...

 

The Table Component

The Table  component 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. To best understand how to use a table, you'll want to have some familiarity with the Reporting Basics we cover in the Report Design introduction. Also, Selection and Superselection are particularly important when dealing with Tables.

When you create a table, by default, you will see something 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.

 

Anatomy of a Table

It's important to understand that the table has multiple sections, each with its own properties. By default, the table consists of three sections:

  • Table Body - Parent section of a table.
  • Table Row - Containers for the Text Shapes. There are three types of table row: Header, Details, and Summary. More details on Table Rows can be found on the Table Header, Details and Summary Rows page. 
  • Text Shapes - Similar to the standalone Text Shape component, these are embedded directly into the rows on the table. 

Each section has its own properties. These will appear in the Properties tab of the Property Inspector when selected. 

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!


If you look at the Configure Table tab, you will see that it has a default data key of "Objects", which matches the Details row on the component as shown in the image above. Changing the Data Key will also change the name on the row making it easier to determine what you are looking at when editing multiple tables or Grouping.



Once you have a table in your report and selected a Data Key for it, you can start designing. There are many tools built into the Table interface that you can use to control its behavior, or select rows and cells.

 

 

Sorting

Sorting orders your data by a key or list of keys. There are three types of Sorting in Tables.  

  • Default - data is sorted based on the order in which it is retrieved.
  • Basic -  takes a list of keys and sorts by the first one.  If the sort results in a tie, the tie will be resolved by the next key in the list, and so on.  
  • TopN - uses a single key path, with a Count value that allows a limit to the number of rows that are processed.

  
Basic and TopN sorts can be configured for either ascending () or descending () sorts.  They can also utilize aggregate (calculation) keys.

The TopN option Include Others will include all values outside of the specified Count range by compressing them into a single row.

 

 Basic Sort Example


Example

This example uses the same table and performed different sorts. The first uses the Default sort, the second uses a Basic Sort as configured in the image below.


To alternate to descending, you can click the  icon to toggle to a descending sort.

The results of the each sort is shown below.The left table is sorted by its primary key (OrderID), and the right table is sorted by Ascending Subtotal.

 

Filtering

Filtering gives the option of processing data based on an expression. The Filtering property can be found in the Property Inspector under the Properties tab.



If the expression resolves false, the row will be skipped. Note: you do not need @ symbols to reference keys.

 

 Filtered TopN Sort Example
Example

This example is sorted descending by downtime and filtered by downtime greater than 20 minutes.



 

Row Versioning

In the Table component, you can add different versions for your rows. This allows you to do things like alternate background colors, or make the first row different, or show negative valued rows differently. To use Row Versioning, click on the word "Standard" on the far right of a row. You will see a list of your existing row versions (only one named "Standard" appears initially) followed by options to add new row versions. Once you have added a few row versions, you can swap between them by selecting one from this list.

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.

Row Version NameDescription
StandardThis is the standard row. Every other option will use this to fill in remaining rows.
Remove
Add First OnlyA row version that is used for the first piece of data, but not for any others. This is not the same as using a header row, the header will not have access to the first row of data.
Add Reprint
Add AlternateEvery other row starting with the second row will use this version.
Add TopN Others
Add Split Header
Add CustomThis version allows you to enter a function for whether to select it. When this option is selected, you must enter a name for the new row version. For esample, you could select "Version1" and use a function like this: "col2>5?Version1:Version2"


 Alternating Rows Example

In this example, we will give alternating rows a simple background change to make your report easier to read.

-stuff-


Other Table Components

There are a few other tables in the Report Module, and they all behave a little differently than the main table.

  • 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.

 


 

  • No labels