Default automatic presets
Switch the page to the edit mode.
Insert the Table Transformer macro and paste the tables or the macros outputting tables within the macro body.
Select the macro and click Edit.
In the Presets tab select Merge tables preset and click Next.
Define the parameters if needed.
Save the macro and the page.
The Merge tables preset merges tables with the same column labels (headers) into a combined report (additional rows are added).
The default SQL query works with no need to change it:
When the columns have the same column labels (look here to learn what query to use when the column labels differ)
When the columns are both in the same or in the different orders
SQL query explanation
In the SQL query tab in the macro browser you can find the default query:
SELECT * outputs all columns from source tables. Replace the asterisk with a comma separated list of column labels in single quotes to output only these columns in the merged table:
FROM T* gets data from all tables within the macro body. Replace the asterisk with the number of the table to use the particular table only:
Switch the page to the edit mode.
Insert the Table Transformer macro and paste the tables or the macros outputting tables within the macro body.
Select the macro and click Edit.
In the Presets tab select Lookup tables preset.
Select the column for matching records and click Next.
Define the parameters if needed.
Save the macro and the page.
The Lookup tables preset joins tables into a combined report (additional columns are added) using a unique key column.
SQL query explanation
In the SQL query tab in the macro browser you can find the default query:
SELECT * outputs all columns from source tables. Replace the asterisk with a comma separated list of column labels in single quotes to output only these columns in the merged table:
OUTER JOIN T* looks up all tables. You can also use other functions:
- OUTER JOIN outputs all rows from all tables even if there are no matches.
- JOIN outputs only those rows, that have matches.
- LEFT JOIN outputs all rows from the first table even if there are no matches.
- RIGHT JOIN outputs all rows from the second table even if there are no matches.
ON T1.'Name' = T*.'Name' is the matching criteria. The rows in the merged table should match on the column Name.
The following table settings are available in the Table Transformer macro:
Decimal separator
Thousands separator
Decimal places
Transpose source tables
Transpose result tables
To set the settings:
Select the macro and click Edit.
Switch to the Settings tab.
Define settings.
Save the macro and the page.
View options
The following view options are available in the Table Transformer macro:
- Show/Hide source data
- Show single-cell result as text
- Export to CSV button
- Export to PDF button
- Export to Word button
- Print button
Show single-cell result as text can be enabled only if the result is displayed as a table with a single cell.
To set the settings:
- Select the macro and click Edit.
- Switch to the Options tab.
- Define settings.
- Save the macro and the page.
To get more options such as default sorting and row numbering, freezing the first N rows/columns and others wrap the Table Transformer macro in the Table Filter macro.