Difference between revisions of "RadiMation Application Note 159"

From RadiWiki
Jump to: navigation, search
(Specific columns)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
__NOTOC__ <!-- This application note uses a report generator template that is attached to ticket: #14967 -->
 
__NOTOC__ <!-- This application note uses a report generator template that is attached to ticket: #14967 -->
== How to include nicely formatted tables in a report ==
+
== How to create a formatted table in a report ==
This application note shows how the report generator codes in the report generator template can be modified, to automatically include nicely formatted tables in the final report.
+
This application note demonstrates how to modify the report generator codes in the report generator template can be modified, to automatically include well-formatted tables in the final report.
  
 
In this application note it is demonstrated with the peak table of an emission test, 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 inserted by the report generator in the report.
 
In this application note it is demonstrated with the peak table of an emission test, 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 inserted by the report generator in the report.
Line 13: Line 13:
  
 
=== A simple table ===
 
=== A simple table ===
When the {{ReportGeneratorCode|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.
+
When the {{ReportGeneratorCode|TEST|EMISSION TABLE}} is used, a borderless table will be inserted in the generated report. Although it appears as a table in Microsoft Word, it lacks proper formatting.
  
 
[[File:AppNote159 SimpleTable.png|border]]
 
[[File:AppNote159 SimpleTable.png|border]]
  
 
=== Table with border ===
 
=== Table with border ===
Borders can be added to the inserted table, by including the report generator code itself in a table with the desired borders. This can be achieved by creating a table in the template, which is only 1 column wide and has a height of 1 row. The report generator code ({{ReportGeneratorCode|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 configuration. While the table is inserted in the report during the generation, additional columns and rows will be added, but these will also use the border configuration of the original table from the template.  
+
Borders can be added to the inserted table, by including the report generator code itself in a table with the desired borders. This can be achieved by creating a table in the template, which is only 1 column wide and has a height of 1 row. The report generator code ({{ReportGeneratorCode|TEST|EMISSION TABLE}}) can then be included in that single cell of the table. Format the table with the desired border width and style. The final report will reflect these border settings. While the table is inserted in the report during the generation, additional columns and rows will be added, but these will also use the border configuration of the original table from the template.  
  
 
This will result in a table with a border.
 
This will result in a table with a border.
Line 25: Line 25:
  
 
=== Specific columns ===
 
=== Specific columns ===
The standard table can by default contain much more columns than desired. 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 [[Chapter_13#SQL_queries_on_tables|SQL queries on tables]] section in [[Chapter 13]] of the [[Manual|{{RadiMation}} user manual]] for more details.
+
The standard table can by default contain too many columns. To simplify the 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 [[Chapter_13#SQL_queries_on_tables|SQL queries on tables]] section in [[Chapter 13]] of the [[Manual|{{RadiMation}} user manual]] for more details.
  
 
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.  
 
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.  
Line 38: Line 38:
  
 
=== Formatted table design ===
 
=== Formatted table design ===
Microsoft Word allows to use predefined table styles, to have a nice coloured table, with different header colours and alternating row colours. Any existing table style can be applied to the table that is present in the report generator template. The same table style will then also be applied to the final table as it is present in the generated report.  
+
Microsoft Word allows to use predefined table styles for a visually appealing table with different header colours and alternating row colours. Any existing Microsoft Word table style can be applied to the table that is specified in the report generator template. The same table style will then also be applied to the final table as it is present in the generated report.  
  
This not only applies to the predefined table styles, but can also be a custom table style, or a style that is predefined in the company style guidelines.  
+
This not only applies to the predefined table styles, but can also be used with custom table style, or a table style that is predefined in the company style guidelines.  
  
 
This can for example result in:
 
This can for example result in:
Line 58: Line 58:
  
 
== Conclusion ==
 
== Conclusion ==
Using the techniques provided in this application note, it is possible to create a report generator 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.
+
By following the techniques in this application note, you can configure a report generator template to automatically produce well-formatted tables, eliminating the need for manual modifications by the test engineer.
  
 
[[Category:RadiMation Application Note]]
 
[[Category:RadiMation Application Note]]

Latest revision as of 12:30, 29 August 2024

How to create a formatted table in a report

This application note demonstrates how to modify the report generator codes in the report generator template can be modified, to automatically include well-formatted tables in the final report.

In this application note it is demonstrated with the peak table of an emission test, 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 inserted by the report generator in the report.

The formatting of the table is explained in multiple steps, where each step adds some additional formatting, and the used techniques are explained and 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

When the ||TEST|EMISSION TABLE|| is used, a borderless table will be inserted in the generated report. Although it appears as a table in Microsoft Word, it lacks proper formatting.

AppNote159 SimpleTable.png

Table with border

Borders can be added to the inserted table, by including the report generator code itself in a table with the desired borders. This can be achieved 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. Format the table with the desired border width and style. The final report will reflect these border settings. While the table is inserted in the report during the generation, additional columns and rows will be added, but these will also use the border configuration of the original table from the template.

This will result in a table with a border.

AppNote159 TableWithBorder.png

Specific columns

The standard table can by default contain too many columns. To simplify the 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 for more details.

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

Microsoft Word allows to use predefined table styles for a visually appealing table with different header colours and alternating row colours. Any existing Microsoft Word table style can be applied to the table that is specified in the report generator template. The same table style will then also be applied to the final table as it is present in the generated report.

This not only applies to the predefined table styles, but can also be used with custom table style, or a table style that is predefined in the company style guidelines.

This can for example result in:

AppNote159 FormattedTableDesign.png

Custom header

When there is a need to provide some changes in the header of the final table in the report, it is possible to provide a custom header.

The table that is inserted in the report generator table can be extended, to include a header row with multiple columns with the desired text and formatting. All the cells in the second row of that table in the template can be merged into a single cell, which includes the actual report generator code. During the generation of the report, the columns that are inserted by the report generator code will be made as wide as the already provided columns in the first row of the table.

AppNote159 CustomHeader.png

The only manual operation that should now be performed by the test-engineer is to remove the second row of the final table. At this moment this is still a manual operation and cannot be automated yet.

In the last screenshot also another last improvement is added. If the report generator code is centre aligned within the cell, also all the texts in the final table will be using that same formatting and will thus also be centre aligned.

Conclusion

By following the techniques in this application note, you can configure a report generator template to automatically produce well-formatted tables, eliminating the need for manual modifications by the test engineer.