A few weeks ago we started to deliver new generation (2.xx) of DTM Query Reporter to our customers. This article starts a series of four compositions about new features of the software product. The first article names the key changes and provides some examples. The second one shows most important capabilities of report title, header, and footer. The third dwells with the value markers and custom column properties. And the last one shows how to use value converters to make the report more flexible.
As you probably know, DTM Query Reporter is a tool that generates a report based on SQL query or more complex scenario. It is easy to use but provides the user with a wide range of use cases. In the simplest case, the user can enter a query and provide output file name. At the other hand, the software offers advanced features: title, header and footer customization, macros, value markers, custom column properties, query parameterization, etc.
At the moment, the professional edition of the reporting tool supports seven output formats: HTML, RTF (compatible with Microsoft Word, Open Office Writer, and most popular editors), XML, plain text, PDF, Microsoft Excel and Windows HTML Help (CHM). Most of the mentioned functions can work with all formats. However, there are some limitations due to document structure. As an example, text and XML documents does not allow to change data item colors. The HTML document does not support page orientation (landscape or portrait), etc.
Unlike the simple query test in the first generation, the new version of the reporting tool offers the complete preview. It shows up to 50 first report rows for each result set provided by the query, SQL script or server-side stored procedure call. The key advantage of the preview function is complete support of product's function. It shows not a raw data retrieved from the database, but the customizable title, header, footer, markers, custom design of the report columns, etc.
Moreover, the preview applies all styles defined for HTML/CHM documents. However, there is is a limitation. The preview shows HTML even your output format is PDF or XML. To view the actual report, the user has to run reporting project execution. By default, DTM Query Reporter will open the generated report with associated program: Word for RTF output, Acrobat Reader for PDF, etc
The second addition of the new release that we want to mention is a report style. Unlike the old one, new generator of the tool supports a few style files. The user can modify predefined styles or add a new one to the style set. The style file is an HTML document with built-in CSS definitions. The style files location is "tmpl" folder of the product installation directory.
The important feature of the reporting tool is a multi-set results support. In other words, the report can contain a few tables with data. Each set can contain individual header and footer. We'll describe this option in the second article of the series.
The new generation of the utility offers more than 15 macros to customize query, header, title, footer and output file name. The macro is a string like $DATE.YYYY$. During the report generation, the software will replace it with the actual data like a four-digits year in the example above. This feature allows users to generate a new output file for each report execution by including $TIME$ macro to the output file name. For example, for "e:\reports\order$DATE$-$TIME$.html" string the program will create report file name like "e:\reports\order20092016-090053.html". The user enabled to customize the format of presentation for $DATE$ and $TIME$ macros at the product settings window. Meantime, the program will remove unacceptable separators (':' as an example) if you use a macro as a part of file name. How to access actual file name? DTM Query Reporter offers $FILE$ macros for this purpose.
New edition of the tool provides the user with the multi-project environment. That means a few queries with individual connection properties, report parameters, and options. After the start, the reporter restores a list of recent projects. The recent report list of the File menu helps to access to recent but now closed projects.
Like the first generation, new product supports query parameterization. The new one has a preview feature at the "Parameters" tab. The preview shows how the reporting tool recognizes value file content.
However, the new version allows customers to use the parameters not only in query and file name. The report title, header, and footer can contain refers to parameters value. We'll provide some examples in the second article of the series.