RadiMation Application Note 159

From RadiWiki
Jump to navigation Jump to search

How to include nicely formatted tables in a report[edit]

This application note shows how the report generator template can be created, to include nicely formatted tables in the final report.

In this case the peak table of an emission test is used, however the same techniques can be used on any table, thus it is also applicable to the table of used equipment, the table of cables, the table of information items and any other table that can be included in the report.

The formatting of the table is explained in multiple steps, where each step adds some additional formatting, and the techniques are added gradually. The steps are separated as:

  1. A simple table
  2. Table with border
  3. Specific columns
  4. Formatted table design
  5. Custom header

A simple table[edit]

When the ||TEST|EMISSION TABLE|| is used, a borderless table will be inserted in the generated report. It is inserted in Microsoft Word as a table, however it does not look very nice.

AppNote159 SimpleTable.png

Table with border[edit]

Borders can be added to the inserted table, by creating a table in the template, which is only 1 column wide and has a height of 1 row. The report generator code (||TEST|EMISSION TABLE||) can then be included in that single cell of the table. The table can be formatted with the desired border width and border style, which will result in a table in the final report, that has the same border. While the table is inserted in the report during the generation, additional columns and rows will be added, but these will take over the border configuration of the original table from the template.

This will result in a table with a border.

AppNote159 TableWithBorder.png

Specific columns[edit]

The standard table can by default contain too much columns, and to create a clear report, it can be necessary to only select a sub-set of the available columns. By using the SQL SELECT-query of the report generator, it is possible to only include a sub-set of the available columns. See the SQL queries on tables section in Chapter 13 of the RadiMation® user manual.

The SQL SELECT-query is using the format: "SELECT <COLUMN-NAME-1>, <COLUMN-NAME-2> FROM <REPORT GENERATOR CODE>". The desired columns can thus be included, separated by comma's. If a column-name contains a space, the column name itself should be included in '[ ]'. Any unit that is present in the column name, doesn't need to be specified.

To only select a few columns from the ||TEST|EMISSION TABLE||, the report generator command can thus be expanded to: ||TEST|SELECT [Peak Number], Frequency, Quasi-Peak, [Quasi-Peak Limit], [Quasi-Peak Difference], Angle, Height, Polarization, Status FROM EMISSION TABLE||.

This will result in:

AppNote159 SpecificColumns.png

The order in which the column-names are specified in the SQL SELECT-query, will also be used for the order of the columns in the inserted table.

Formatted table design[edit]

AppNote159 FormattedTableDesign.png

Custom header[edit]

AppNote159 CustomHeader.png


Conclusion[edit]

Using the provided techniques in this application note, it is possible to create a template that is configured to automatically generate nicely formatted tables in the final report in an automated process, without the need for the test engineer to manually modify the report.