There is the last part of the series about DTM Query Reporter. It describes a few ways to modify the view of the report item. The first article introduces major changes of the reporting tool. The second helps the reader to customize report components: title, header, and footer. The third one tells about markers and column properties.
The value conversion feature helps users to modify a presentation of the report cell at the client side. By performance reason, it is recommended to use conversions at the server or query side. For most conversions, the database systems provide the user with built-in functions for this purpose. Typically, the server-side conversion faster than client side for at least 20-30%. However, if the mentioned function is not available for your database or file format the conversion feature of DTM Query Reporter is suitable.
At the moment, the reporting tool offers six conversion options: prefix, suffix, number format, group of digits separator for integer numbers, date format conversions, and regular expression based substring replacement.
It is important to understand the converters applicability and priority. The reporting tool applies prefix and suffix after any another conversion, i.e. it never changes prefix and suffix value during conversion.
The regular expression has higher priority than all others, except prefix and suffix. In other words, if you provide regular expression the utility not uses another converter even it is specified by the user. The user should apply date format converter to DATE and TADETTIME formats only.
Let's review some examples of the converters usage. The first and simplest example uses for Price column to add USD suffix to the value and remove extra zeros after dot:
The second example shows how to convert date from YYYY-MM-DD to DD-MON-YYYY format:
The last mentioned conversion method is most complex and powerful. It is a replacement of the value substring based on regular expression. In the example, we'll replace "Inc." substring at the end of report cell value to "Incorporated" substring: