Footer Rows and Footer Modes (Data Table Functionality)

From Grooper Wiki
(Redirected from Generate Footer Row)

This article is about the current version of Grooper.

Note that some content may still need to be updated.

2025 2023.1

A "Footer Row" is a row at the bottom of a table Data Table that displays sum totals for numerical view_column Data Columns. This can help Data Viewer users validate data Grooper extracts for one or more Data Columns. The Data Column's "Footer Mode" controls if a sum calculation is performed or not (and if Tabular Layout's "Capture Footer Row" creates the Footer Row if and how document data is used to capture and validate the footer value).

You may download the ZIP(s) below and upload it into your own Grooper environment (version 2025). The first contains one or more Batches of sample documents. The second contains one or more Projects with resources used in examples throughout this article.

About

What is a footer?

A "footer", in terms of table extraction, is a line that indicates you've reached the last row of a table.

What is a "Footer Row"?

A "Footer Row" is a special row at the end of a Data Table that displays sum totals for numerical Data Columns. Users may select one or more Data Columns to be totaled.
  • Only Data Columns whose Value Types are numerical (Decimal, Double, Int16, etc) can be totaled.

What is a "Footer Row" for?

Most commonly, Footer Rows aid Review (Data Viewer) users.
  • Footer Rows provide an "at-a-glance" way to verify if the data Grooper extracted in each row adds up correctly.
  • This can help catch OCR errors or mistakes on the source document resulting in an incorrect total value.
While less common, there are ways to export Footer Row data generated by Generate Footer Row. The Footer Row is stored as a special footer instance in the documents data file created by Extract (Grooper.DocumentData.json).
  • Data Export will not export the footer instance to a database table.

How do I display a footer row in Grooper?

There are two ways depending on what Data Table extract method you're using: "Generate Footer Row" or "Capture Footer Row"
"Generate Footer Row" is property found on Data Table nodes.
  • Generate Footer Row can be utilized by all Table Extract Methods.
  • Generate Footer Row will add a blank Footer Row at the bottom at the end of the Data Table in a Data Viewer.
  • When a Data Column's "Footer Mode" is set to "Calculate", Grooper will sum each cell value and display it in the Footer Row.


"Capture Footer Row" is a property of the Tabular Layout Table Extract Method.
  • Capture Footer Row can only be utilized by the Tabular Layout method.
  • Capture Footer Row extracts a Footer Row from the document using the Footer Detection extractor (or a Footer label if using Label Sets).
    • Creating a footer row in this way has additional Footer Mode options. You can simply populate the footer row with values collected from the document. You can validate the value collected totals up according to values collected for a column. There are also modes that allow you to calculate a footer value if not present on the document (or otherwise not extracted from the document).
    • Enabling this property will override the Generate Footer Row property, if configured.

What is a "Footer Mode"?

"Footer Mode" is a property found on Data Columns. This property determines how footer values are extracted or calculated for each Data Column.
  • Only numerical Data Columns can use Footer Modes. The "Footer Mode" property will not appear unless the Data Column's Value Type is numeric (Decimal, Double, Int16, etc.).
"Generate Footer Row" only has two valid Footer Modes:
  • Disabled - This will disable footer calculation for a Data Column.
  • Calculate - This will enable footer calculation for a Data Column.
"Capture Footer Row" can use all Footer Modes:
  • Disabled - This will disable footer calculation for a Data Column.
  • Calculate - This will enable footer calculation for a Data Column (same functionality as "Generate Footer Row").
  • Enabled - This will extract the Data Column's value from the Footer Row on the document. If no Footer Row is present on the document, no value is extracted.
  • Validate - This will extract the Data Column's value from the Footer Row on the document and perform additional validation. The Data Column's cell in the Footer Row will be flagged if the extracted value does not match the column's calculated sum.
  • CalculateIfEmpty - This will extract the Data Column's value from the Footer Row on the document and perform validation on the extracted value. The Data Column's cell in the Footer Row will be flagged if the extracted value does not match the column's calculated sum. If no Footer Row is present on the document, Grooper will calculate the sum for the Data Column.

Generate Footer Row

A Footer Row can be created for any Data Table in two steps:

  1. Enable the "Generate Footer Row" by enabling the Generate Footer Row property.
  2. Set one or more numerical Data Column's "Footer Mode" to "Calculate".
    • While there are multiple Footer Mode options, only two apply for footer rows generated by the Generate Footer Row property:
      • Disabled - This will disable footer calculation for a Data Column
      • Calculate - This will enable footer calculation for a Data Column


Generate Footer Row does not extract data. It calculates it from each row extracted by the Data Table. Generate Footer Row will create Footer Rows whether a footer row appears on the document or not. In the case of the image below:

  • "Table A" has a Footer Row present on the document totaling the "Salary" column.
  • "Table B" has no such row on the document.


In either case, the Generate Footer Row property can generate the footer row and calculate the totaled value for the Data Column, as seen in the image below.


To enable Generate Footer Row and set a Data Column's Footer Mode:

  1. Select the Data Table in the node tree.
  2. Turn the "Generate Footer Row" property to True.
  3. Press the "Save" button to save changes to the Data Table.
    • With no Data Column configuration, you will see a blank Footer Row in a Data Viewer. However, no Data Column values will be totaled until their "Footer Mode" is set.
  4. Determine which Data Columns you wish to have values totaled in the Footer Row. Ensure these Data Columns' Value Type is set to a numeric type (Decimal, Double, Int16 etc.).
  5. Select the Data Column in the node tree.
  6. Change the "Footer Mode" to "Calculate".
    • BE AWARE: This property will not appear unless the Value Type is a numeric type. This property will not be visible when the Value Type is "String".
    • BE AWARE: When using Generate Footer Row, the only valid choices are "Disabled" or "Calculate". If you select Enabled, Validate or CalculateIfEmpty, they will behave the same as "Disabled".
  7. Upon extraction, Data Columns whose Footer Mode is "Calculate" will be totaled in the Footer Row (Cells will be blank for all other Data Columns).

Capture Footer Row

The Tabular Layout method has a unique way of generating a Footer Row. It will actually extract a table's footer row (if present on a document) when the "Capture Footer Row" property is enabled.

  • The Footer Row is extracted by the "Footer Detection" extractor.
  • If using Label Sets, the Footer Row is extracted using the Data Table's "Footer" label.
  • Capture Footer Row is incompatible with Generate Footer Row. If Capture Footer Row and Generate Footer Row are both enabled, Grooper will ignore Generate Footer Row and only use Capture Footer Row to create Footer Rows.


After enabling the "Capture Footer Row" property, you will set one or more numerical Data Column's "Footer Mode". "Capture Footer Row" can use all Footer Modes:

  • Disabled - This will disable footer calculation for a Data Column.
  • Calculate - This will enable footer calculation for a Data Column (same functionality as "Generate Footer Row").
  • Enabled - This will extract the Data Column's value from the Footer Row on the document. If no Footer Row is present on the document, no value is extracted.
  • Validate - This will extract the Data Column's value from the Footer Row on the document and perform additional validation. The Data Column's cell in the Footer Row will be flagged if the extracted value does not match the column's calculated sum.
  • CalculateIfEmpty - This will extract the Data Column's value from the Footer Row on the document and perform validation on the extracted value. The Data Column's cell in the Footer Row will be flagged if the extracted value does not match the column's calculated sum. If no Footer Row is present on the document, Grooper will calculate the sum for the Data Column.

See below for how Grooper behaves in different scenarios for each Footer Mode for a "Salary" Data Column.

Scenario 1: Footer is present on the document and has the correct footer value (Salary = 50000).

Scenario 2: Footer is not present on the document.

Scenario 3: Footer is present on the document and has the incorrect value (Salary = 9999999999999).

"Footer Mode: Disabled" result No calculation or extraction occurs. Always results in a blank footer value.

No footer value collected

No footer value collected

No footer value collected

"Footer Mode: Calculate" result

The footer value is calculated (Each Data Column cell value is simply added together).

The footer value is calculated.

The footer value is calculated.

The footer value is calculated.

"Footer Mode: Enabled" result

Tabular Layout's "Footer Detection" extractor (or the Data Table's "Footer" label) is used to locate the Footer Row on the document.

The footer value is extracted from the Footer Row. No validation occurs.

No footer row is present on the document. No value is extracted. No validation occurs.

The footer value is extracted from the Footer Row. No validation occurs.

"Footer Mode: Validate" result

Tabular Layout's "Footer Detection" extractor (or the Data Table's "Footer" label) is used to locate the Footer Row on the document. Additional validation occurs.

The footer value is extracted from the Footer Row. Data is valid.

No footer row is present on the document. Data is invalid. Footer value is flagged.

The footer value is extracted from the Footer Row. Data is invalid. Footer value is flagged.

"Footer Mode: CalculateIfEmpty" result

Tabular Layout's "Footer Detection" extractor (or the Data Table's "Footer" label) is used to locate the Footer Row on the document. If no Footer Row is extracted, the footer value is calculated (Each Data Column cell value is added together). Additional validation occurs.

The footer value is extracted from the Footer Row. Data is valid.

No footer row is present on the document. Footer value is calculated. Data is valid.

The footer value is extracted from the Footer Row. Data is invalid. Footer value is flagged.


To enable Capture Footer Row and set a Data Column's Footer Mode:

  1. Select the Data Table in the node tree.
  2. Ensure the "Extract Method" is set to "Tabular Layout".
  3. Ensure the "Footer Detection" property is configured (or, if using Label Sets, a "Footer" label is collected for the Data Table).
  4. Ensure the "Capture Footer Row" property is set to "True".
    • Capture Footer Row is enabled (set to True) by default.
  5. Press the "Save" button to save changes to the Data Table.
    • With no Data Column configuration, you will see a blank Footer Row in a Data Viewer. However, no Data Column values will be totaled until their "Footer Mode" is set.
  6. Determine which Data Columns you wish to have values totaled in the Footer Row. Ensure these Data Columns' Value Type is set to a numeric type (Decimal, Double, Int16 etc.).
  7. Select the Data Column in the node tree.
  8. Change the "Footer Mode" to the mode of your choosing. See the example above for more information on each Footer Mode.
    • BE AWARE: This property will not appear unless the Value Type is a numeric type. This property will not be visible when the Value Type is "String".
  9. Upon extraction, Data Columns will be totaled (or not) in the Footer Row according to their Footer Mode.